The emu is now paused when minimized.

WM_PAINT is handled when the emu is paused so the screen is still refreshed.
The screen buffer is filled with white upon reset, if you don't like it you can set another color.
This commit is contained in:
luigi__ 2009-02-09 18:59:52 +00:00
parent a94dd4290e
commit 32fd9d5ec5
2 changed files with 26 additions and 2 deletions

View File

@ -319,6 +319,9 @@ void GPU_Reset(GPU *g, u8 l)
//DISP_FIFOclear(&g->disp_fifo);
memset(GPU_screen, 0, sizeof(GPU_screen));
memset(GPU_tempScreen, 0, sizeof(GPU_tempScreen));
for(int i = 0; i < (256*192*2); i++)
((u16*)GPU_screen)[i] = 0x7FFF;
}
void GPU_DeInit(GPU * gpu)

View File

@ -1928,8 +1928,29 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
return 1;
//break;
case WM_SIZE:
GetWndRect(hwnd);
return 0;
switch(wParam)
{
case SIZE_MINIMIZED:
{
NDS_Pause();
}
break;
default:
{
NDS_UnPause();
GetWndRect(hwnd);
}
break;
}
return 0;
case WM_PAINT:
if(paused)
{
osd->update();
Display();
osd->clear();
}
return DefWindowProc(hwnd, message, wParam, lParam);
case WM_DROPFILES:
{
char filename[MAX_PATH] = "";