mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-03-03 19:47:59 +00:00
Windows: If neither OpenGL nor D3D9 is available, offer an escape route into D3D11.
This does happen on some fresh Win10 installations. We really should do something much nicer and more automatic, but that's for later.
This commit is contained in:
parent
554029b477
commit
3f7602227c
@ -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();
|
||||
|
@ -26,6 +26,7 @@ enum class VKRRenderCommand : uint8_t {
|
||||
DRAW,
|
||||
DRAW_INDEXED,
|
||||
PUSH_CONSTANTS,
|
||||
NUM_RENDER_COMMANDS,
|
||||
};
|
||||
|
||||
struct VkRenderData {
|
||||
|
@ -623,7 +623,7 @@ static void RemoveDrawCommands(std::vector<VkRenderData> *cmds) {
|
||||
}
|
||||
|
||||
static void CleanupRenderCommands(std::vector<VkRenderData> *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.)
|
||||
|
Loading…
x
Reference in New Issue
Block a user