mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-23 02:38:52 -05:00
Merge branch 'master' of github.com:elmindreda/glfw
This commit is contained in:
commit
2b4c556cd0
|
@ -43,7 +43,7 @@ static GLboolean getClosestVideoMode(int* width, int* height,
|
||||||
int* bpp, int* refreshRate,
|
int* bpp, int* refreshRate,
|
||||||
GLboolean exactBPP)
|
GLboolean exactBPP)
|
||||||
{
|
{
|
||||||
int mode, bestWidth, bestHeight, bestBPP, bestRate;
|
int mode, bestWidth = 0, bestHeight = 0, bestBPP = 0, bestRate = 0;
|
||||||
unsigned int sizeDiff, rateDiff, leastSizeDiff, leastRateDiff;
|
unsigned int sizeDiff, rateDiff, leastSizeDiff, leastRateDiff;
|
||||||
GLboolean foundMode = GL_FALSE;
|
GLboolean foundMode = GL_FALSE;
|
||||||
DEVMODE dm;
|
DEVMODE dm;
|
||||||
|
@ -130,7 +130,7 @@ void _glfwSetVideoMode(int* width, int* height,
|
||||||
closestRate = *refreshRate;
|
closestRate = *refreshRate;
|
||||||
|
|
||||||
if (getClosestVideoMode(&closestWidth, &closestHeight,
|
if (getClosestVideoMode(&closestWidth, &closestHeight,
|
||||||
&closestBPP, &closestRate, GL_FALSE))
|
&closestBPP, &closestRate, exactBPP))
|
||||||
{
|
{
|
||||||
dm.dmSize = sizeof(DEVMODE);
|
dm.dmSize = sizeof(DEVMODE);
|
||||||
dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL;
|
dm.dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL;
|
||||||
|
|
|
@ -106,6 +106,8 @@ static LRESULT CALLBACK keyboardHook(int nCode, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
||||||
void _glfwPlatformEnableSystemKeys(_GLFWwindow* window)
|
void _glfwPlatformEnableSystemKeys(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
|
UNREFERENCED_PARAMETER(window);
|
||||||
|
|
||||||
if (_glfwLibrary.Win32.keyboardHook != NULL)
|
if (_glfwLibrary.Win32.keyboardHook != NULL)
|
||||||
{
|
{
|
||||||
UnhookWindowsHookEx(_glfwLibrary.Win32.keyboardHook);
|
UnhookWindowsHookEx(_glfwLibrary.Win32.keyboardHook);
|
||||||
|
@ -120,6 +122,8 @@ void _glfwPlatformEnableSystemKeys(_GLFWwindow* window)
|
||||||
|
|
||||||
void _glfwPlatformDisableSystemKeys(_GLFWwindow* window)
|
void _glfwPlatformDisableSystemKeys(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
|
UNREFERENCED_PARAMETER(window);
|
||||||
|
|
||||||
_glfwLibrary.Win32.keyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL,
|
_glfwLibrary.Win32.keyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL,
|
||||||
keyboardHook,
|
keyboardHook,
|
||||||
_glfwLibrary.Win32.instance,
|
_glfwLibrary.Win32.instance,
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
|
|
||||||
static void hideCursor(_GLFWwindow* window)
|
static void hideCursor(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
|
UNREFERENCED_PARAMETER(window);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,6 +70,8 @@ static void captureCursor(_GLFWwindow* window)
|
||||||
|
|
||||||
static void showCursor(_GLFWwindow* window)
|
static void showCursor(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
|
UNREFERENCED_PARAMETER(window);
|
||||||
|
|
||||||
// Un-capture cursor
|
// Un-capture cursor
|
||||||
ReleaseCapture();
|
ReleaseCapture();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user