mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +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 setaspect_new_use_dimen;
|
||||
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 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.
|
||||
SystemCallbacks *sysCallbacks;
|
||||
double refreshfreq;
|
||||
FString endoomName;
|
||||
bool batchrun;
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@
|
|||
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
||||
|
||||
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
||||
extern double refreshfreq;
|
||||
extern IVideo *Video;
|
||||
|
||||
EXTERN_CVAR (Int, vid_adapter)
|
||||
|
@ -451,19 +450,6 @@ SDLVideo::SDLVideo ()
|
|||
Priv::CreateWindow(SDL_WINDOW_HIDDEN);
|
||||
}
|
||||
#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 ()
|
||||
|
|
|
@ -58,7 +58,6 @@ extern "C" {
|
|||
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
||||
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
||||
}
|
||||
void GetRefreshRate(HWND hWnd);
|
||||
|
||||
EXTERN_CVAR(Int, vid_defwidth)
|
||||
EXTERN_CVAR(Int, vid_defheight)
|
||||
|
@ -339,7 +338,6 @@ void SystemBaseFrameBuffer::PositionWindow(bool fullscreen, bool initialcall)
|
|||
}
|
||||
m_Fullscreen = fullscreen;
|
||||
SetSize(GetClientWidth(), GetClientHeight());
|
||||
GetRefreshRate(Window);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -135,8 +135,7 @@ LPDIRECTINPUT g_pdi3;
|
|||
extern bool AppActive;
|
||||
|
||||
int SessionState = 0;
|
||||
int BlockMouseMove;
|
||||
extern double refreshfreq;
|
||||
int BlockMouseMove;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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 result;
|
||||
|
@ -446,7 +429,6 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
break;
|
||||
|
||||
case WM_SETFOCUS:
|
||||
GetRefreshRate(hWnd);
|
||||
I_CheckNativeMouse (false, EventHandlerResultForNativeMouse); // This cannot call the event handler. Doing it from here is unsafe.
|
||||
break;
|
||||
|
||||
|
@ -491,8 +473,6 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||
break;
|
||||
|
||||
case WM_DISPLAYCHANGE:
|
||||
GetRefreshRate(hWnd);
|
||||
// fall through
|
||||
case WM_STYLECHANGED:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
|
||||
|
|
Loading…
Reference in a new issue