Previous 15994 Revisions Next

r8053 Sunday 16th May, 2010 at 16:25:29 UTC by Firewave
[WIMGTOOL] Added workaround for wWinMain bug in MinGW (fixes bug 1950)
[src/mess/tools/imgtool/windows]wmain.c

src/mess/tools/imgtool/windows/wmain.c
r8052r8053
2323   int pos, rc = -1;
2424   imgtoolerr_t err;
2525   HACCEL accel = NULL;
26   // workaround for MinGW bug - command_line_w actually contains a LPSTR
27#ifdef _MSC_VER
2628   LPSTR utf8_command_line = utf8_from_wstring(command_line_w);
29#else
30   LPSTR utf8_command_line = (LPSTR)command_line_w;
31#endif
2732   // initialize Windows classes
2833   InitCommonControls();
2934   if (!wimgtool_registerclass())
r8052r8053
6873         wimgtool_report_error(window, err, utf8_command_line + pos, NULL);
6974   }
7075
76#ifdef _MSC_VER
7177   osd_free(utf8_command_line);
78#endif
7279   utf8_command_line = NULL;
7380
7481   accel = LoadAccelerators(NULL, MAKEINTRESOURCE(IDA_WIMGTOOL_MENU));

Previous 15994 Revisions Next


© 1998-2018 The MESS Team