(Windows) Move TwiddleLayer from main.cpp to display.cpp (prepare for new hotkeys)

This commit is contained in:
SuuperW 2018-08-30 11:01:57 -05:00
parent 5cc49fe417
commit 811d9a3c18
3 changed files with 10 additions and 10 deletions

View File

@ -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);
}

View File

@ -104,5 +104,6 @@ FORCEINLINE void ServiceDisplayThreadInvocations()
}
void UpdateWndRects(HWND hwnd, RECT* newClientRect = NULL);
void TwiddleLayer(UINT ctlid, int core, int layer);
#endif

View File

@ -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)
{