• R/O
  • SSH
  • HTTPS

oswan: Commit


Commit MetaInfo

Revision95 (tree)
Zeit2010-05-17 23:59:26
Autorbird_may_nike

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- oswanj/trunk/src/WSMain.cpp (revision 94)
+++ oswanj/trunk/src/WSMain.cpp (revision 95)
@@ -34,7 +34,7 @@
3434 wchar_t* RecentOfn[] = {RecentOfn0, RecentOfn1, RecentOfn2, RecentOfn3, RecentOfn4, RecentOfn5};
3535 extern wchar_t StateName[512];
3636
37-int WINAPI WinMain(HINSTANCE hCurInst, HINSTANCE hPrevInst, LPSTR lpsCmdLine, int nCmdShow)
37+int WINAPI wWinMain(HINSTANCE hCurInst, HINSTANCE hPrevInst, LPWSTR lpsCmdLine, int nCmdShow)
3838 {
3939 MSG msg;
4040 HACCEL accel;
@@ -61,6 +61,15 @@
6161 WsInputInit(hWnd);
6262 WsInputSetKeyMap(0);
6363 WsSplash();
64+ if (lpsCmdLine[0] != 0)
65+ {
66+ apuWaveClear();
67+ WsRelease();
68+ Run = 1;
69+ WsCreate(lpsCmdLine);
70+ SetRecentRoms(lpsCmdLine);
71+ SetStateInfo();
72+ }
6473 while (1) {
6574 if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
6675 {
--- oswanj/trunk/src/WSFileio.cpp (revision 94)
+++ oswanj/trunk/src/WSFileio.cpp (revision 95)
@@ -24,10 +24,9 @@
2424
2525 void WsSetDir(void)
2626 {
27- wchar_t *p, argv[512];
27+ wchar_t *p;
2828
29- MultiByteToWideChar(932, MB_PRECOMPOSED, __argv[0], -1, argv, 512);
30- wcscpy(CurDir, argv);
29+ wcscpy(CurDir, __wargv[0]);
3130 p = wcsrchr(CurDir, L'\\');
3231 if (p == NULL)
3332 {
@@ -77,6 +76,7 @@
7776 }
7877 if ((fp = _wfopen(CartName, L"rb")) == NULL)
7978 {
79+ MessageBox(NULL, CartName, NULL, MB_OK);
8080 ErrorMsg(ERR_FOPEN);
8181 return -1;
8282 }
Show on old repository browser