mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 16:30:30 +02:00
Show warning instead of crash in windows non 32 bit colour
This commit is contained in:
1 parent
cc4882267a
commit
93cd5ecec3
1 file changed
+9
@@ -97,6 +97,15 @@ unsigned int WINAPI TheThread(void *)
|
||||
|
||||
host->UpdateUI();
|
||||
|
||||
//Check Colour depth
|
||||
HDC dc = GetDC(NULL);
|
||||
u32 colour_depth = GetDeviceCaps(dc, BITSPIXEL);
|
||||
ReleaseDC(NULL, dc);
|
||||
if (colour_depth != 32){
|
||||
MessageBoxA(0, "Only support 32 bit colour", "OpenGL Error", MB_OK);
|
||||
ExitProcess(1);
|
||||
}
|
||||
|
||||
std::string error_string;
|
||||
if (!host->InitGL(&error_string)) {
|
||||
Reporting::ReportMessage("OpenGL init error: %s", error_string.c_str());
|
||||
|
||||
Reference in new issue
Block a user