diff --git a/Windows/GPU/WindowsGLContext.cpp b/Windows/GPU/WindowsGLContext.cpp index 43eeaca913..7004fdde24 100644 --- a/Windows/GPU/WindowsGLContext.cpp +++ b/Windows/GPU/WindowsGLContext.cpp @@ -249,7 +249,7 @@ bool WindowsGLContext::InitFromRenderThread(std::string *error_message) { ExitProcess(1); } const char *defaultError = "Insufficient OpenGL driver support detected!\n\n" - "Your GPU reports that it does not support OpenGL 2.0. Would you like to try using DirectX 9 instead?\n\n" + "Your GPU reports that it does not support OpenGL 2.0. Would you like to try using DirectX instead?\n\n" "DirectX is currently compatible with less games, but on your GPU it may be the only choice.\n\n" "Visit the forums at http://forums.ppsspp.org for more information.\n\n"; @@ -262,7 +262,10 @@ bool WindowsGLContext::InitFromRenderThread(std::string *error_message) { if (yes) { // Change the config to D3D and restart. - g_Config.iGPUBackend = (int)GPUBackend::DIRECT3D9; + const char *d3d9Or11 = "Direct3D 9? (Or no for Direct3D 11)"; + std::wstring whichD3D9 = ConvertUTF8ToWString(err->T("D3D9or11", d3d9Or11)); + bool d3d9 = IDYES == MessageBox(hWnd_, whichD3D9.c_str(), title.c_str(), MB_YESNO); + g_Config.iGPUBackend = d3d9 ? (int)GPUBackend::DIRECT3D9 : (int)GPUBackend::DIRECT3D11; g_Config.Save(); W32Util::ExitAndRestart(); diff --git a/ext/native/thin3d/VulkanQueueRunner.h b/ext/native/thin3d/VulkanQueueRunner.h index 8d5b229139..3ff8e161ea 100644 --- a/ext/native/thin3d/VulkanQueueRunner.h +++ b/ext/native/thin3d/VulkanQueueRunner.h @@ -26,6 +26,7 @@ enum class VKRRenderCommand : uint8_t { DRAW, DRAW_INDEXED, PUSH_CONSTANTS, + NUM_RENDER_COMMANDS, }; struct VkRenderData { diff --git a/ext/native/thin3d/VulkanRenderManager.cpp b/ext/native/thin3d/VulkanRenderManager.cpp index e4a6796934..a7cec21ed8 100644 --- a/ext/native/thin3d/VulkanRenderManager.cpp +++ b/ext/native/thin3d/VulkanRenderManager.cpp @@ -623,7 +623,7 @@ static void RemoveDrawCommands(std::vector *cmds) { } static void CleanupRenderCommands(std::vector *cmds) { - size_t lastCommand[256]; + size_t lastCommand[(int)VKRRenderCommand::NUM_RENDER_COMMANDS]; memset(lastCommand, -1, sizeof(lastCommand)); // Find any duplicate state commands (likely from RemoveDrawCommands.)