L
Lorp
Guest
Can't toggle windows full-screen
I have two identical games with a persistent game object in each of the first rooms. full-screen toggle works on the game without physics and doesn't on the one with. I'm not sure this is the problem but it's the only difference I haven't check because it breaks the game when I turn it off.
I used the code below and all the functionality work with the exception of full-screen. if I spam f1 by using "keyboard_check(vk_f1)", I get the following windows errors:
1. win32 function failed: HRESULT:0x8007000e call: at line 369 in file\Graphics_DisplayM.cpp
2. win32 function failed: HRESULT:0x887a0001
call: g_SwapChain ->GetBuffer at line 524 in file\Graphics_DisplayM.cpp
3.win32 function failed: HRESULT:0x80070057
call: GR_D3D_Device->CreateRenderTargetView at line 527 in file/Graphics_DisplayM.cpp
how do I fix this?
create
window_set_fullscreen(true); //start in full-screen
step
if(keyboard_check(vk_escape) or gamepad_button_check(0,gp_start)){
game_end();
}
if(keyboard_check_pressed(vk_f1)){
if(window_get_fullscreen() == true){
window_set_fullscreen(false);
} else {
window_set_fullscreen(true);
}
}
if(keyboard_check(vk_enter)){
game_restart();
}
I have two identical games with a persistent game object in each of the first rooms. full-screen toggle works on the game without physics and doesn't on the one with. I'm not sure this is the problem but it's the only difference I haven't check because it breaks the game when I turn it off.
I used the code below and all the functionality work with the exception of full-screen. if I spam f1 by using "keyboard_check(vk_f1)", I get the following windows errors:
1. win32 function failed: HRESULT:0x8007000e call: at line 369 in file\Graphics_DisplayM.cpp
2. win32 function failed: HRESULT:0x887a0001
call: g_SwapChain ->GetBuffer at line 524 in file\Graphics_DisplayM.cpp
3.win32 function failed: HRESULT:0x80070057
call: GR_D3D_Device->CreateRenderTargetView at line 527 in file/Graphics_DisplayM.cpp
how do I fix this?
create
window_set_fullscreen(true); //start in full-screen
step
if(keyboard_check(vk_escape) or gamepad_button_check(0,gp_start)){
game_end();
}
if(keyboard_check_pressed(vk_f1)){
if(window_get_fullscreen() == true){
window_set_fullscreen(false);
} else {
window_set_fullscreen(true);
}
}
if(keyboard_check(vk_enter)){
game_restart();
}