\r
char *romname;\r
HWND FrameWnd=NULL;\r
+RECT FrameRectMy;\r
\r
int MainWidth=720,MainHeight=480;\r
\r
// Window proc for the frame window:\r
static LRESULT CALLBACK WndProc(HWND hwnd,UINT msg,WPARAM wparam,LPARAM lparam)\r
{\r
- if (msg==WM_CLOSE) { PostQuitMessage(0); return 0; }\r
- if (msg==WM_DESTROY) FrameWnd=NULL; // Blank handle\r
+ switch (msg)\r
+ {\r
+ case WM_CLOSE: PostQuitMessage(0); return 0;\r
+ case WM_DESTROY: FrameWnd=NULL; break; // Blank handle\r
+ case WM_SIZE:\r
+ case WM_MOVE:\r
+ case WM_SIZING: GetWindowRect(hwnd, &FrameRectMy); break;\r
+ }\r
\r
return DefWindowProc(hwnd,msg,wparam,lparam);\r
}\r
FrameWnd=CreateWindow(wc.lpszClassName,"PicoDrive " VERSION,style|WS_VISIBLE,\r
left,top,width,height,NULL,NULL,NULL,NULL);\r
\r
+ ShowWindow(FrameWnd, SW_NORMAL);\r
+ UpdateWindow(FrameWnd);\r
+ GetWindowRect(FrameWnd, &FrameRectMy);\r
+\r
return 0;\r
}\r
\r
unsigned char *rom_data = 0;\r
unsigned int rom_size = 0;\r
\r
+ static char rompath[MAX_PATH] = { 0, };\r
+ pm_file *rom = NULL;\r
+\r
FrameInit();\r
ret=LoopInit(); if (ret) goto end0;\r
\r
// notaz: load rom\r
- static char rompath[MAX_PATH]; rompath[0] = 0;\r
strcpy(rompath, cmdline + (cmdline[0] == '\"' ? 1 : 0));\r
if(rompath[strlen(rompath)-1] == '\"') rompath[strlen(rompath)-1] = 0;\r
\r
- pm_file *rom = 0;\r
if(strlen(rompath) > 4) rom = pm_open(rompath);\r
if(!rom) {\r
OPENFILENAME of; ZeroMemory(&of, sizeof(OPENFILENAME));\r