• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision1835311770b5b1cc2e81631309d942449f10cf4b (tree)
Time2019-07-11 20:51:52
AuthorStarg <starg@user...>
CommiterStarg

Log Message

Fix for Unicode compatibility

Change Summary

Incremental Difference

--- a/interface/w32g_i.c
+++ b/interface/w32g_i.c
@@ -643,9 +643,9 @@ static void InitMainMenu(HWND hWnd)
643643 mii.wID = IDM_OUTPUT_OPTIONS;
644644 mii.fType = MFT_STRING;
645645 if (PlayerLanguage == LANGUAGE_JAPANESE) {
646- mii.dwTypeData = "オプション(&O)";
646+ mii.dwTypeData = _T("オプション(&O)");
647647 } else {
648- mii.dwTypeData = "&Options";
648+ mii.dwTypeData = _T("&Options");
649649 }
650650 InsertMenuItem(hMenuOutput, 0, TRUE, &mii);
651651 mii.fMask = MIIM_TYPE;
@@ -660,8 +660,10 @@ static void InitMainMenu(HWND hWnd)
660660 } else {
661661 mii.fState = MFS_UNCHECKED;
662662 }
663- mii.dwTypeData = play_mode_list[i]->id_name;
663+ TCHAR* t = char_to_tchar(play_mode_list[i]->id_name);
664+ mii.dwTypeData = t;
664665 InsertMenuItem(hMenuOutput, outputItemStart + i, TRUE, &mii);
666+ safe_free(t);
665667 }
666668 SetMenu(hWnd , hMenu);
667669 // system menu
@@ -670,13 +672,13 @@ static void InitMainMenu(HWND hWnd)
670672 //RemoveMenu(hSystemMenu,SC_SIZE,MF_BYCOMMAND); // comment out for Resize MainWindow
671673 EnableMenuItem(hSystemMenu, SC_MOVE, MF_BYCOMMAND | MF_GRAYED);
672674 InsertMenu(hSystemMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); // 7
673- InsertMenu(hSystemMenu, 0, MF_BYPOSITION, SC_SCREENSAVE, "Screen Saver"); // 6
675+ InsertMenu(hSystemMenu, 0, MF_BYPOSITION, SC_SCREENSAVE, _T("Screen Saver")); // 6
674676 InsertMenu(hSystemMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0); // 5
675- InsertMenu(hSystemMenu, 0, MF_BYPOSITION | MF_STRING, IDM_STOP, "Stop"); // 4
676- InsertMenu(hSystemMenu, 0, MF_BYPOSITION | MF_STRING, IDM_PAUSE, "Pause"); // 3
677- InsertMenu(hSystemMenu, 0, MF_BYPOSITION | MF_STRING, IDM_PREV, "Prev"); // 2
678- InsertMenu(hSystemMenu, 0, MF_BYPOSITION | MF_STRING, IDM_NEXT, "Next"); // 1
679- InsertMenu(hSystemMenu, 0, MF_BYPOSITION | MF_STRING, IDM_PLAY, "Play"); // 0
677+ InsertMenu(hSystemMenu, 0, MF_BYPOSITION | MF_STRING, IDM_STOP, _T("Stop")); // 4
678+ InsertMenu(hSystemMenu, 0, MF_BYPOSITION | MF_STRING, IDM_PAUSE, _T("Pause")); // 3
679+ InsertMenu(hSystemMenu, 0, MF_BYPOSITION | MF_STRING, IDM_PREV, _T("Prev")); // 2
680+ InsertMenu(hSystemMenu, 0, MF_BYPOSITION | MF_STRING, IDM_NEXT, _T("Next")); // 1
681+ InsertMenu(hSystemMenu, 0, MF_BYPOSITION | MF_STRING, IDM_PLAY, _T("Play")); // 0
680682
681683 DrawMenuBar(hWnd);
682684 }
@@ -711,11 +713,11 @@ static void UpdateModuleMenu(HWND hWnd, UINT wId)
711713
712714 static void UpdateOutputMenu(HWND hWnd, UINT wId)
713715 {
714- MENUITEMINFOA mii;
716+ MENUITEMINFO mii;
715717 int i, num = -1, oldnum;
716718
717719 for (i = 0; play_mode_list[i] != 0; i++) {
718- mii.cbSize = sizeof(MENUITEMINFOA);
720+ mii.cbSize = sizeof(MENUITEMINFO);
719721 mii.fMask = MIIM_STATE | MIIM_ID;
720722 GetMenuItemInfo(hMenuOutput, outputItemStart + i, TRUE, &mii);
721723 if (wId == mii.wID) {
@@ -752,11 +754,11 @@ static void RefreshModuleMenu(HWND hWnd)
752754
753755 static void RefreshOutputMenu(HWND hWnd)
754756 {
755- MENUITEMINFOA mii;
757+ MENUITEMINFO mii;
756758 int i;
757759
758760 for (i = 0; play_mode_list[i] != 0; i++) {
759- mii.cbSize = sizeof(MENUITEMINFOA);
761+ mii.cbSize = sizeof(MENUITEMINFO);
760762 mii.fMask = MIIM_STATE | MIIM_ID;
761763 GetMenuItemInfo(hMenuOutput, outputItemStart + i, TRUE, &mii);
762764 if (st_temp->opt_playmode[0] == play_mode_list[i]->id_character) {
@@ -1292,7 +1294,7 @@ MainProc(HWND hwnd, UINT uMess, WPARAM wParam, LPARAM lParam)
12921294 }
12931295 break;
12941296 default:
1295- if (uMess == RegisterWindowMessage("TaskbarCreated")) {
1297+ if (uMess == RegisterWindowMessage(_T("TaskbarCreated"))) {
12961298 ShowWindow(hMainWnd, SW_HIDE);
12971299 ShowWindow(hMainWnd, SW_SHOWNOACTIVATE);
12981300 return 0;