mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2025-03-06 17:31:57 +00:00
Improve pause behaviour
This commit is contained in:
parent
be0852e2e7
commit
a572513b01
4 changed files with 9 additions and 1 deletions
|
@ -234,6 +234,11 @@ engine_t* VR_GetEngine( void ) {
|
|||
return &vr_engine;
|
||||
}
|
||||
|
||||
bool VR_isPauseable( void )
|
||||
{
|
||||
return (bool)( ( clc.state == CA_ACTIVE) && !Cvar_VariableValue ("cl_paused") );
|
||||
}
|
||||
|
||||
bool VR_useScreenLayer( void )
|
||||
{
|
||||
//intermission is never full screen
|
||||
|
|
|
@ -12,6 +12,7 @@ void VR_EnterVR( engine_t* engine, ovrJava java );
|
|||
void VR_LeaveVR( engine_t* engine );
|
||||
|
||||
engine_t* VR_GetEngine( void );
|
||||
bool VR_isPauseable( void );
|
||||
bool VR_useScreenLayer( void );
|
||||
|
||||
float radians(float deg);
|
||||
|
|
|
@ -318,6 +318,8 @@ void VR_DrawFrame( engine_t* engine ) {
|
|||
framebuffers[0].framebuffers[framebuffers[0].swapchainIndex],
|
||||
framebuffers[1].framebuffers[framebuffers[1].swapchainIndex]);
|
||||
|
||||
VR_ClearFrameBuffer(engine->framebuffers.framebuffers[engine->framebuffers.swapchainIndex], eyeW, eyeH);
|
||||
|
||||
Com_Frame();
|
||||
|
||||
for (int eye = 0; eye < VRAPI_FRAME_LAYER_EYE_MAX; ++eye) {
|
||||
|
|
|
@ -95,7 +95,7 @@ int main(int argc, char* argv[]) {
|
|||
while (1) {
|
||||
if (hasFocus != g_HasFocus) {
|
||||
hasFocus = g_HasFocus;
|
||||
if (!hasFocus && !Cvar_VariableValue ("cl_paused")) {
|
||||
if (!hasFocus && VR_isPauseable()) {
|
||||
Com_QueueEvent( Sys_Milliseconds(), SE_KEY, K_ESCAPE, qtrue, 0, NULL );
|
||||
//Com_QueueEvent( Sys_Milliseconds(), SE_KEY, K_CONSOLE, qtrue, 0, NULL );
|
||||
paused = true;
|
||||
|
|
Loading…
Reference in a new issue