win32_4ed.cpp changes?
This commit is contained in:
parent
5c9016ddf2
commit
608744a1ae
|
@ -206,8 +206,8 @@ internal void
|
||||||
win32_toggle_fullscreen(){
|
win32_toggle_fullscreen(){
|
||||||
HWND win = win32vars.window_handle;
|
HWND win = win32vars.window_handle;
|
||||||
DWORD style = GetWindowLongW(win, GWL_STYLE);
|
DWORD style = GetWindowLongW(win, GWL_STYLE);
|
||||||
b32 is_full = ((style & WS_OVERLAPPEDWINDOW) != 0);
|
b32 is_full = ((style & WS_OVERLAPPEDWINDOW) == 0);
|
||||||
if (is_full){
|
if (!is_full){
|
||||||
MONITORINFO info = {sizeof(MONITORINFO)};
|
MONITORINFO info = {sizeof(MONITORINFO)};
|
||||||
if (GetWindowPlacement(win, &win32vars.bordered_win_pos) && GetMonitorInfo(MonitorFromWindow(win, MONITOR_DEFAULTTOPRIMARY), &info)){
|
if (GetWindowPlacement(win, &win32vars.bordered_win_pos) && GetMonitorInfo(MonitorFromWindow(win, MONITOR_DEFAULTTOPRIMARY), &info)){
|
||||||
SetWindowLongW(win, GWL_STYLE, style & ~WS_OVERLAPPEDWINDOW);
|
SetWindowLongW(win, GWL_STYLE, style & ~WS_OVERLAPPEDWINDOW);
|
||||||
|
@ -703,6 +703,8 @@ Win32InitGL(){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReleaseDC(win32vars.window_handle, dc);
|
||||||
|
|
||||||
#if (defined(BUILD_X64) && 1) || (defined(BUILD_X86) && 0)
|
#if (defined(BUILD_X64) && 1) || (defined(BUILD_X86) && 0)
|
||||||
#if defined(FRED_INTERNAL)
|
#if defined(FRED_INTERNAL)
|
||||||
// NOTE(casey): This slows down GL but puts error messages to
|
// NOTE(casey): This slows down GL but puts error messages to
|
||||||
|
@ -721,8 +723,6 @@ Win32InitGL(){
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ReleaseDC(win32vars.window_handle, dc);
|
|
||||||
|
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
glEnable(GL_SCISSOR_TEST);
|
glEnable(GL_SCISSOR_TEST);
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
|
|
Loading…
Reference in New Issue