[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] Win64 cleanups (#329)

Nicolas Cellier notifications at github.com
Fri Dec 28 21:18:51 UTC 2018


nicolas-cellier-aka-nice commented on this pull request.



> @@ -207,8 +207,17 @@ void LoadPreferences()
   }
 
   /* get window title from ini file */
+#ifdef UNICODE
+  {
+    TCHAR windowTitleT[MAX_PATH];
+    GetPrivateProfileString(U_GLOBAL, TEXT("WindowTitle"),
+      TEXT(""), windowTitleT, MAX_PATH, squeakIniName);
+    WideCharToMultiByte(CP_UTF8, 0, windowTitleT, -1, windowTitle, MAX_PATH, NULL, NULL);

Wait, I have been abused by the too-short context: this piece of code is precisely protected with a `#ifdef UNICODE`, so finally I think it is correct.

We may switch to using the W version unconditionnally, but for that, `squeakIniName` must also be UTF-16 encoded. This is part of larger changes that I have cooking and did not commit yet.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/329#discussion_r244409727
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20181228/f799048f/attachment.html>


More information about the Vm-dev mailing list