Commit Graph
23 Commits
Author SHA1 Message Date
Henrik Rydgård f7c2c55e83 Vulkan: Report surface init failures instead of asserting later
VulkanGraphicsContext::InitSurface() threw away VulkanContext::InitSurface()'s
VkResult and carried on, so a failed surface init surfaced as
_dbg_assert_(GetAvailablePresentModes().size() > 0) in the VKContext
constructor rather than as a graphics error with the usual backend fallback.
The vkCreate*SurfaceKHR failure path in ReinitSurface() didn't log anything
either, so the assert was the only trace of it.

Now ReinitSurface() logs and sets init_error_ for all three ways it can bail
(surface creation, ChooseQueue, present mode enumeration), InitSurface()
checks the result, and MainThreadFunc() passes the message back out instead of
writing it to a local it then drops - Windows/main.cpp was reporting
"Failed to initialize main thread function." to the user.

Also deletes the Application on that failure path, which was leaked.
2026-08-30 01:18:37 +02:00
Henrik Rydgård 16206d18ab Simplify the EmuThread API again 2026-08-05 09:48:51 +02:00
Henrik Rydgård ecae62e737 Fix headless with OpenGL for SDL 2026-08-05 00:15:56 +02:00
Henrik Rydgård 551e4cd0ab Headless: Make all GPU backends work correctly on Windows 2026-08-05 00:15:56 +02:00
Henrik Rydgård 25cf52176f Misc headless work 2026-08-05 00:15:56 +02:00
Henrik Rydgård 5eb4772644 Minor EmuThread refactor 2026-08-05 00:15:56 +02:00
Henrik Rydgård be922eca62 Make OpenGL render thread shutdown more robust. 2026-08-04 16:44:55 +02:00
Henrik Rydgård 648560b2d3 Don't exit games when leaving the emuthread 2026-08-04 00:24:39 +02:00
Henrik Rydgård 3eb056ad86 Move Common/GraphicsContext.h to Common/GPU/GraphicsContext.h 2026-07-26 13:58:17 +02:00
Henrik Rydgård 8020b60dda Use the new common RunMainLoop on Android 2026-07-26 13:42:16 +02:00
Henrik Rydgård 29edec7684 Move calling ThreadStart and ThreadEnd into the EmuThread wrapper 2026-07-26 11:54:50 +02:00
Henrik Rydgård ea3a2a2e84 Use the common EmuThread in the Android backend 2026-07-26 11:54:50 +02:00
Henrik Rydgård 2e837e88b4 Small simplification 2026-07-26 11:54:50 +02:00
Henrik Rydgård 7f218acc53 Change the GraphicsContext interface to be more consistent 2026-07-26 10:22:00 +02:00
Henrik Rydgård 85f8715660 Break the circular dependency caused by putting EmuThread in core using an interface 2026-07-24 15:31:42 +02:00
Henrik Rydgård b2c5fdc39f Make EmuThreadFunc match Android's EmuThreadFunc 2026-07-24 15:31:42 +02:00
Henrik Rydgård 86c8e9ae68 Minor code cleanup 2026-07-24 15:31:41 +02:00
Henrik Rydgård af7977267e Add NeedsRenderThread property to GraphicsContext 2026-07-24 15:31:41 +02:00
Henrik Rydgård 86c98c2d23 Prepare EmuThread for other users 2026-07-24 15:31:41 +02:00
Henrik Rydgård cb18929f3a Make EmuThread.cpp/h compile outside of Windows. 2026-07-21 13:25:31 +02:00
Henrik Rydgård 32f975ef85 Windows: Move the graphics context creation to main.cpp 2026-07-21 13:13:01 +02:00
Henrik Rydgård cc69070f19 Remove MainThread_Start/Stop to increase visibility 2026-07-21 12:58:45 +02:00
Henrik Rydgård 221aba92da Move EmuThread.cpp/h to Core, in preparation for sharing logic 2026-07-21 12:50:22 +02:00