diff --git a/desmume/src/frontend/windows/display.cpp b/desmume/src/frontend/windows/display.cpp index 61021e197..a538bb336 100644 --- a/desmume/src/frontend/windows/display.cpp +++ b/desmume/src/frontend/windows/display.cpp @@ -959,3 +959,12 @@ void _ServiceDisplayThreadInvocation() display_invoke_function = NULL; SetEvent(display_invoke_done_event); } + +void TwiddleLayer(UINT ctlid, int core, int layer) +{ + GPUEngineBase *gpu = ((GPUEngineID)core == GPUEngineID_Main) ? (GPUEngineBase *)GPU->GetEngineMain() : (GPUEngineBase *)GPU->GetEngineSub(); + + const bool newLayerState = !CommonSettings.dispLayers[core][layer]; + gpu->SetLayerEnableState(layer, newLayerState); + MainWindow->checkMenu(ctlid, newLayerState); +} diff --git a/desmume/src/frontend/windows/display.h b/desmume/src/frontend/windows/display.h index e43c801fa..ea3662bf5 100644 --- a/desmume/src/frontend/windows/display.h +++ b/desmume/src/frontend/windows/display.h @@ -104,5 +104,6 @@ FORCEINLINE void ServiceDisplayThreadInvocations() } void UpdateWndRects(HWND hwnd, RECT* newClientRect = NULL); +void TwiddleLayer(UINT ctlid, int core, int layer); #endif \ No newline at end of file diff --git a/desmume/src/frontend/windows/main.cpp b/desmume/src/frontend/windows/main.cpp index ff735a4f9..e96a9358e 100755 --- a/desmume/src/frontend/windows/main.cpp +++ b/desmume/src/frontend/windows/main.cpp @@ -3500,16 +3500,6 @@ void SaveWindowPos(HWND hwnd) WritePrivateProfileInt("Video", "WindowPosY", WndY/*MainWindowRect.top*/, IniName); } - -static void TwiddleLayer(UINT ctlid, int core, int layer) -{ - GPUEngineBase *gpu = ((GPUEngineID)core == GPUEngineID_Main) ? (GPUEngineBase *)GPU->GetEngineMain() : (GPUEngineBase *)GPU->GetEngineSub(); - - const bool newLayerState = !CommonSettings.dispLayers[core][layer]; - gpu->SetLayerEnableState(layer, newLayerState); - MainWindow->checkMenu(ctlid, newLayerState); -} - //======================================================================================== LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) {