vr_session: Add vrsession_set_dashboard_visible
This commit is contained in:
parent
98a0aab039
commit
8866c02dc7
3 changed files with 22 additions and 1 deletions
|
@ -3653,7 +3653,19 @@ determine_and_apply_focus()
|
|||
}
|
||||
}
|
||||
|
||||
sdlwindow_visible( global_focus.focusWindow != nullptr );
|
||||
#if HAVE_OPENVR
|
||||
if ( BIsVRSession() )
|
||||
{
|
||||
vrsession_set_dashboard_visible( global_focus.focusWindow != nullptr );
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if ( !BIsVRSession() && BIsNested() )
|
||||
{
|
||||
sdlwindow_visible( global_focus.focusWindow != nullptr );
|
||||
}
|
||||
}
|
||||
|
||||
// Some games such as Disgaea PC (405900) don't take controller input until
|
||||
// the window is first clicked on despite it having focus.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include "vr_session.hpp"
|
||||
#include "main.hpp"
|
||||
#include "openvr.h"
|
||||
#include "rendervulkan.hpp"
|
||||
#include "steamcompmgr.hpp"
|
||||
#include "wlserver.hpp"
|
||||
|
@ -149,6 +150,7 @@ bool vrsession_init()
|
|||
vr::VROverlay()->SetOverlayFlag( GetVR().hOverlay, vr::VROverlayFlags_EnableControlBarClose, GetVR().bEnableControlBarClose );
|
||||
vr::VROverlay()->SetOverlayFlag( GetVR().hOverlay, vr::VROverlayFlags_WantsModalBehavior, GetVR().bModal );
|
||||
vr::VROverlay()->SetOverlayFlag( GetVR().hOverlay, vr::VROverlayFlags_SendVRSmoothScrollEvents, true );
|
||||
vr::VROverlay()->SetOverlayFlag( GetVR().hOverlay, vr::VROverlayFlags_VisibleInDashboard, false );
|
||||
vrsession_update_touch_mode();
|
||||
|
||||
vr::VROverlay()->SetOverlayWidthInMeters( GetVR().hOverlay, GetVR().flPhysicalWidth );
|
||||
|
@ -183,6 +185,11 @@ bool vrsession_visible()
|
|||
return g_bOverlayVisible.load();
|
||||
}
|
||||
|
||||
void vrsession_set_dashboard_visible( bool bVisible )
|
||||
{
|
||||
vr::VROverlay()->SetOverlayFlag( GetVR().hOverlay, vr::VROverlayFlags_VisibleInDashboard, bVisible );
|
||||
}
|
||||
|
||||
void vrsession_wait_until_visible()
|
||||
{
|
||||
if (vrsession_visible())
|
||||
|
|
|
@ -27,3 +27,5 @@ void vrsession_title( const char *title, std::shared_ptr<std::vector<uint32_t>>
|
|||
bool vrsession_ime_init();
|
||||
|
||||
void vrsession_steam_mode( bool bSteamMode );
|
||||
|
||||
void vrsession_set_dashboard_visible( bool bVisible );
|
||||
|
|
Loading…
Reference in a new issue