mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-22 10:04:39 +00:00
adding safe back to not open multiple games, plus more info into the tip
This commit is contained in:
parent
903400328c
commit
50aa8ec6bb
@ -3,7 +3,7 @@
|
||||
|
||||
#include "layer.h"
|
||||
|
||||
#include <imgui.h>
|
||||
#include "SDL3/SDL_events.h"
|
||||
|
||||
#include "SDL3/SDL_log.h"
|
||||
#include "common/config.h"
|
||||
@ -30,7 +30,7 @@ static bool show_simple_fps = false;
|
||||
static bool visibility_toggled = false;
|
||||
|
||||
static bool show_fullscreen_tip = true;
|
||||
static float fullscreen_tip_timer = 5.0f;
|
||||
static float fullscreen_tip_timer = 8.0f;
|
||||
|
||||
static float fps_scale = 1.0f;
|
||||
static int dump_frame_count = 1;
|
||||
@ -362,6 +362,11 @@ void L::SetupSettings() {
|
||||
void L::Draw() {
|
||||
const auto io = GetIO();
|
||||
PushID("DevtoolsLayer");
|
||||
if (IsKeyPressed(ImGuiKey_F4, false)) {
|
||||
SDL_Event quitEvent;
|
||||
quitEvent.type = SDL_EVENT_QUIT;
|
||||
SDL_PushEvent(&quitEvent);
|
||||
}
|
||||
|
||||
if (show_fullscreen_tip) {
|
||||
fullscreen_tip_timer -= io.DeltaTime;
|
||||
@ -371,8 +376,10 @@ void L::Draw() {
|
||||
// Display the fullscreen tip near the top-left corner, below pause message if needed
|
||||
ImVec2 pos(10, 30); // adjust Y so it doesn't overlap pause text at y=10
|
||||
ImU32 color = IM_COL32(255, 255, 255, 255);
|
||||
ImGui::GetForegroundDrawList()->AddText(
|
||||
pos, color, "Press F11 to toggle FullScreen and F9 to Pause Emulation");
|
||||
ImGui::GetForegroundDrawList()->AddText(pos, color,
|
||||
"Press F11 to toggle FullScreen\n"
|
||||
"F9 to Pause Emulation\n"
|
||||
"F4 to Stop Game");
|
||||
}
|
||||
}
|
||||
if (!DebugState.IsGuestThreadsPaused()) {
|
||||
@ -452,4 +459,4 @@ void L::Draw() {
|
||||
}
|
||||
|
||||
PopID();
|
||||
}
|
||||
}
|
@ -801,6 +801,12 @@ void MainWindow::CreateConnects() {
|
||||
}
|
||||
|
||||
void MainWindow::StartGame() {
|
||||
if (isGameRunning) {
|
||||
QMessageBox::critical(nullptr, tr("Run Game"), tr("Game is already running!"));
|
||||
return;
|
||||
}
|
||||
|
||||
isGameRunning = false;
|
||||
BackgroundMusicPlayer::getInstance().stopMusic();
|
||||
QString gamePath = "";
|
||||
int table_mode = m_gui_settings->GetValue(gui::gl_mode).toInt();
|
||||
|
Loading…
Reference in New Issue
Block a user