mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 13:30:02 +00:00
Minor cleanup
This commit is contained in:
parent
9b9d8592db
commit
60a837f19f
@ -476,7 +476,9 @@ void NativeInit(int argc, const char *argv[],
|
||||
|
||||
// We do this here, instead of in NativeInitGraphics, because the display may be reset.
|
||||
// When it's reset we don't want to forget all our managed things.
|
||||
gl_lost_manager_init();
|
||||
if (g_Config.iGPUBackend == GPU_BACKEND_OPENGL) {
|
||||
gl_lost_manager_init();
|
||||
}
|
||||
}
|
||||
|
||||
void NativeInitGraphics() {
|
||||
@ -772,8 +774,11 @@ void NativeUpdate(InputState &input) {
|
||||
void NativeDeviceLost() {
|
||||
g_gameInfoCache.Clear();
|
||||
screenManager->deviceLost();
|
||||
gl_lost();
|
||||
glstate.Restore();
|
||||
|
||||
if (g_Config.iGPUBackend == GPU_BACKEND_OPENGL) {
|
||||
gl_lost();
|
||||
glstate.Restore();
|
||||
}
|
||||
// Should dirty EVERYTHING
|
||||
}
|
||||
|
||||
@ -941,7 +946,9 @@ void NativeResized() {
|
||||
}
|
||||
|
||||
void NativeShutdown() {
|
||||
gl_lost_manager_shutdown();
|
||||
if (g_Config.iGPUBackend == GPU_BACKEND_OPENGL) {
|
||||
gl_lost_manager_shutdown();
|
||||
}
|
||||
|
||||
screenManager->shutdown();
|
||||
delete screenManager;
|
||||
|
@ -1,23 +1,26 @@
|
||||
#include "stdafx.h"
|
||||
#include "CommonWindows.h"
|
||||
|
||||
#include <WinUser.h>
|
||||
#include <shellapi.h>
|
||||
#include <commctrl.h>
|
||||
|
||||
#include "Misc.h"
|
||||
#include "util/text/utf8.h"
|
||||
#include <commctrl.h>
|
||||
|
||||
bool IsVistaOrHigher() {
|
||||
OSVERSIONINFOEX osvi;
|
||||
DWORDLONG dwlConditionMask = 0;
|
||||
int op = VER_GREATER_EQUAL;
|
||||
ZeroMemory(&osvi, sizeof(OSVERSIONINFOEX));
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
ZeroMemory(&osvi, sizeof(osvi));
|
||||
osvi.dwOSVersionInfoSize = sizeof(osvi);
|
||||
osvi.dwMajorVersion = 6; // Vista is 6.0
|
||||
osvi.dwMinorVersion = 0;
|
||||
|
||||
VER_SET_CONDITION(dwlConditionMask, VER_MAJORVERSION, op);
|
||||
VER_SET_CONDITION(dwlConditionMask, VER_MINORVERSION, op);
|
||||
|
||||
return (bool)VerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION, dwlConditionMask);
|
||||
return VerifyVersionInfo(&osvi, VER_MAJORVERSION | VER_MINORVERSION, dwlConditionMask) != FALSE;
|
||||
}
|
||||
|
||||
namespace W32Util
|
||||
|
Loading…
Reference in New Issue
Block a user