From 77da6267bfb05f368efd39d6a7c26ed7c5f4c3d4 Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 3 Aug 2009 05:08:37 +0000 Subject: [PATCH] win32: guess for now we have burn cycles copying the GPU_screen so that we keep a pristine copy for screenshots. also screenshots for savestates. the final display handling pipeline still isnt finished yet so this could change again --- desmume/src/windows/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 109785133..5ece2f3ed 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -164,6 +164,8 @@ extern LRESULT CALLBACK RamSearchProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARA void InitRamSearch(); void FilterUpdate(HWND hwnd, bool user=true); +CACHE_ALIGN u8 GPU_screen_unmodified_buffer[4*256*192]; + CRITICAL_SECTION win_execute_sync; volatile int win_sound_samplecounter = 0; @@ -194,7 +196,6 @@ inline bool IsDlgCheckboxChecked(HWND hDlg, int id) LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM); - char SavName[MAX_PATH] = ""; char ImportSavName[MAX_PATH] = ""; char szClassName[ ] = "DeSmuME"; @@ -925,7 +926,8 @@ void Display() if(CommonSettings.single_core) { - video.srcBuffer = (u8*)GPU_screen; + memcpy(GPU_screen_unmodified_buffer,GPU_screen,256*192*4); + video.srcBuffer = (u8*)GPU_screen_unmodified_buffer; DoDisplay(true); } else