mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-30 19:24:23 +01:00
Minor EmuThread refactor
This commit is contained in:
1 parent
edd968062a
commit
5eb4772644
9 files changed
+41
-32
No files matched your search
+6
-1
@@ -1233,6 +1233,7 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
System_Notify(SystemNotification::UI);
|
||||
|
||||
std::thread mainThread = std::thread([]() {
|
||||
// TODO: We can really merge all of this into MainThreadFunc
|
||||
std::string errorMessage;
|
||||
std::string *deviceNameSetting;
|
||||
std::unique_ptr<GraphicsContext> graphicsContext(CreateGraphicsContext((GPUBackend)g_Config.iGPUBackend, &deviceNameSetting));
|
||||
@@ -1240,7 +1241,11 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
HandleGraphicsFailure(errorMessage);
|
||||
return;
|
||||
}
|
||||
if (!MainThreadFunc(graphicsContext.get(), new NativeApplication(), WINDOWSYSTEM_WIN32, MainWindow::GetHInstance(), MainWindow::GetHWND(), []() {})) {
|
||||
if (!MainThreadFunc(graphicsContext.get(), new NativeApplication(), WINDOWSYSTEM_WIN32, MainWindow::GetHInstance(), MainWindow::GetHWND(),
|
||||
[](GraphicsContext *graphicsContext) {
|
||||
NativeFrame(graphicsContext);
|
||||
return GetUIState() != UISTATE_EXIT;
|
||||
})) {
|
||||
HandleGraphicsFailure("Failed to initialize main thread function.");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user