Move is_input_allowed to GSFrameBase

This commit is contained in:
Megamouse 2025-02-24 21:45:22 +01:00
parent 8d801dadc4
commit 9082908606
5 changed files with 16 additions and 7 deletions

View file

@ -571,6 +571,7 @@ target_sources(rpcs3_emu PRIVATE
RSX/Program/program_util.cpp
RSX/Program/SPIRVCommon.cpp
RSX/Program/VertexProgramDecompiler.cpp
RSX/GSFrameBase.cpp
RSX/RSXDisAsm.cpp
RSX/RSXFIFO.cpp
RSX/RSXOffload.cpp

View file

@ -0,0 +1,10 @@
#include "stdafx.h"
#include "GSFrameBase.h"
#include "Emu/system_config.h"
atomic_t<bool> g_game_window_focused = false;
bool is_input_allowed()
{
return g_game_window_focused || g_cfg.io.background_input_enabled;
}

View file

@ -114,6 +114,7 @@
<ClCompile Include="Emu\RSX\Core\RSXContext.cpp" />
<ClCompile Include="Emu\RSX\Core\RSXDisplay.cpp" />
<ClCompile Include="Emu\RSX\Core\RSXDrawCommands.cpp" />
<ClCompile Include="Emu\RSX\GSFrameBase.cpp" />
<ClCompile Include="Emu\RSX\Host\MM.cpp" />
<ClCompile Include="Emu\RSX\Host\RSXDMAWriter.cpp" />
<ClCompile Include="Emu\RSX\NV47\FW\draw_call.cpp" />

View file

@ -1342,6 +1342,9 @@
<ClCompile Include="Emu\RSX\Program\FragmentProgramRegister.cpp">
<Filter>Emu\GPU\RSX\Program</Filter>
</ClCompile>
<ClCompile Include="Emu\RSX\GSFrameBase.cpp">
<Filter>Emu\GPU\RSX\Game Window</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Crypto\aes.h">

View file

@ -53,20 +53,14 @@ extern atomic_t<bool> g_user_asked_for_recording;
extern atomic_t<bool> g_user_asked_for_screenshot;
extern atomic_t<bool> g_user_asked_for_frame_capture;
extern atomic_t<bool> g_disable_frame_limit;
extern atomic_t<bool> g_game_window_focused;
extern atomic_t<recording_mode> g_recording_mode;
atomic_t<bool> g_game_window_focused = false;
namespace pad
{
extern atomic_t<bool> g_home_menu_requested;
}
bool is_input_allowed()
{
return g_game_window_focused || g_cfg.io.background_input_enabled;
}
gs_frame::gs_frame(QScreen* screen, const QRect& geometry, const QIcon& appIcon, std::shared_ptr<gui_settings> gui_settings, bool force_fullscreen)
: QWindow()
, m_initial_geometry(geometry)