mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-15 12:10:53 +00:00
- remove all code used to get current display's refresh rate.
* Serves no purpose in Raze or GZDoom and appears to only have been added to the backend to facilitate the older interpolation code that was excised in 893686709b
.
This commit is contained in:
parent
f8952d5cae
commit
4830989d32
5 changed files with 1 additions and 39 deletions
|
@ -25,7 +25,6 @@ extern int32_t newaspect_enable;
|
||||||
extern int32_t r_fpgrouscan;
|
extern int32_t r_fpgrouscan;
|
||||||
extern int32_t setaspect_new_use_dimen;
|
extern int32_t setaspect_new_use_dimen;
|
||||||
extern int32_t xres, yres, bpp;
|
extern int32_t xres, yres, bpp;
|
||||||
extern double refreshfreq;
|
|
||||||
|
|
||||||
int32_t videoCheckMode(int32_t *x, int32_t *y, int32_t c, int32_t fs, int32_t forced);
|
int32_t videoCheckMode(int32_t *x, int32_t *y, int32_t c, int32_t fs, int32_t forced);
|
||||||
int32_t videoSetMode(int32_t x, int32_t y, int32_t c, int32_t fs);
|
int32_t videoSetMode(int32_t x, int32_t y, int32_t c, int32_t fs);
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
|
|
||||||
// Some global engine variables taken out of the backend code.
|
// Some global engine variables taken out of the backend code.
|
||||||
SystemCallbacks *sysCallbacks;
|
SystemCallbacks *sysCallbacks;
|
||||||
double refreshfreq;
|
|
||||||
FString endoomName;
|
FString endoomName;
|
||||||
bool batchrun;
|
bool batchrun;
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,6 @@
|
||||||
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
||||||
|
|
||||||
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
||||||
extern double refreshfreq;
|
|
||||||
extern IVideo *Video;
|
extern IVideo *Video;
|
||||||
|
|
||||||
EXTERN_CVAR (Int, vid_adapter)
|
EXTERN_CVAR (Int, vid_adapter)
|
||||||
|
@ -451,19 +450,6 @@ SDLVideo::SDLVideo ()
|
||||||
Priv::CreateWindow(SDL_WINDOW_HIDDEN);
|
Priv::CreateWindow(SDL_WINDOW_HIDDEN);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Get refresh rate for current display.
|
|
||||||
SDL_DisplayMode display;
|
|
||||||
|
|
||||||
if(SDL_GetCurrentDisplayMode(vid_adapter, &display) == 0)
|
|
||||||
{
|
|
||||||
refreshfreq = display.refresh_rate;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
fprintf(stderr, "Failed to get refresh rate: %s\n", SDL_GetError());
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SDLVideo::~SDLVideo ()
|
SDLVideo::~SDLVideo ()
|
||||||
|
|
|
@ -58,7 +58,6 @@ extern "C" {
|
||||||
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
||||||
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||||
}
|
}
|
||||||
void GetRefreshRate(HWND hWnd);
|
|
||||||
|
|
||||||
EXTERN_CVAR(Int, vid_defwidth)
|
EXTERN_CVAR(Int, vid_defwidth)
|
||||||
EXTERN_CVAR(Int, vid_defheight)
|
EXTERN_CVAR(Int, vid_defheight)
|
||||||
|
@ -339,7 +338,6 @@ void SystemBaseFrameBuffer::PositionWindow(bool fullscreen, bool initialcall)
|
||||||
}
|
}
|
||||||
m_Fullscreen = fullscreen;
|
m_Fullscreen = fullscreen;
|
||||||
SetSize(GetClientWidth(), GetClientHeight());
|
SetSize(GetClientWidth(), GetClientHeight());
|
||||||
GetRefreshRate(Window);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -135,8 +135,7 @@ LPDIRECTINPUT g_pdi3;
|
||||||
extern bool AppActive;
|
extern bool AppActive;
|
||||||
|
|
||||||
int SessionState = 0;
|
int SessionState = 0;
|
||||||
int BlockMouseMove;
|
int BlockMouseMove;
|
||||||
extern double refreshfreq;
|
|
||||||
|
|
||||||
static bool EventHandlerResultForNativeMouse;
|
static bool EventHandlerResultForNativeMouse;
|
||||||
|
|
||||||
|
@ -345,22 +344,6 @@ bool CallHook(FInputDevice *device, HWND hWnd, UINT message, WPARAM wParam, LPAR
|
||||||
return device->WndProcHook(hWnd, message, wParam, lParam, result);
|
return device->WndProcHook(hWnd, message, wParam, lParam, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetRefreshRate(HWND hWnd)
|
|
||||||
{
|
|
||||||
HMONITOR moni = MonitorFromWindow(hWnd, MONITOR_DEFAULTTONEAREST);
|
|
||||||
MONITORINFOEXA moninf;
|
|
||||||
moninf.cbSize = sizeof(moninf);
|
|
||||||
if (GetMonitorInfoA(moni, (LPMONITORINFO)&moninf))
|
|
||||||
{
|
|
||||||
DEVMODEA dm;
|
|
||||||
dm.dmSize = sizeof(DEVMODEA);
|
|
||||||
if (EnumDisplaySettingsA(moninf.szDevice, ENUM_CURRENT_SETTINGS, &dm))
|
|
||||||
{
|
|
||||||
refreshfreq = dm.dmDisplayFrequency;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
LRESULT result;
|
LRESULT result;
|
||||||
|
@ -446,7 +429,6 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_SETFOCUS:
|
case WM_SETFOCUS:
|
||||||
GetRefreshRate(hWnd);
|
|
||||||
I_CheckNativeMouse (false, EventHandlerResultForNativeMouse); // This cannot call the event handler. Doing it from here is unsafe.
|
I_CheckNativeMouse (false, EventHandlerResultForNativeMouse); // This cannot call the event handler. Doing it from here is unsafe.
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -491,8 +473,6 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WM_DISPLAYCHANGE:
|
case WM_DISPLAYCHANGE:
|
||||||
GetRefreshRate(hWnd);
|
|
||||||
// fall through
|
|
||||||
case WM_STYLECHANGED:
|
case WM_STYLECHANGED:
|
||||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue