mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-02 15:32:52 +00:00
Icon rename, adding f9 press for pause game when no gui is on without needed of debug menu
This commit is contained in:
parent
48497c9bd6
commit
d48b6cf429
@ -1,6 +1,7 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "SDL3/SDL_log.h"
|
||||
#include "layer.h"
|
||||
|
||||
#include <imgui.h>
|
||||
@ -93,9 +94,7 @@ void L::DrawMenuBar() {
|
||||
{
|
||||
Checkbox("RCAS", &fsr.use_rcas);
|
||||
BeginDisabled(!fsr.use_rcas);
|
||||
{
|
||||
SliderFloat("RCAS Attenuation", &fsr.rcas_attenuation, 0.0, 3.0);
|
||||
}
|
||||
{ SliderFloat("RCAS Attenuation", &fsr.rcas_attenuation, 0.0, 3.0); }
|
||||
EndDisabled();
|
||||
}
|
||||
EndDisabled();
|
||||
@ -381,6 +380,28 @@ void L::Draw() {
|
||||
visibility_toggled = true;
|
||||
}
|
||||
|
||||
if (IsKeyPressed(ImGuiKey_F9, false)) {
|
||||
if (!io.KeyCtrl && !io.KeyAlt) {
|
||||
if (DebugState.IsGuestThreadsPaused()) {
|
||||
DebugState.ResumeGuestThreads();
|
||||
SDL_Log("Game resumed from Keyboard");
|
||||
show_pause_status = false;
|
||||
} else {
|
||||
DebugState.PauseGuestThreads();
|
||||
SDL_Log("Game paused from Keyboard");
|
||||
show_pause_status = true;
|
||||
}
|
||||
visibility_toggled = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (show_pause_status) {
|
||||
ImVec2 pos = ImVec2(10, 10);
|
||||
ImU32 color = IM_COL32(255, 255, 255, 255);
|
||||
|
||||
ImGui::GetForegroundDrawList()->AddText(pos, color, "Game Paused Press F9 to Resume");
|
||||
}
|
||||
|
||||
if (show_simple_fps) {
|
||||
if (Begin("Video Info", nullptr,
|
||||
ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoDecoration |
|
||||
|
@ -19,6 +19,7 @@ public:
|
||||
static void SetupSettings();
|
||||
|
||||
void Draw() override;
|
||||
bool show_pause_status = false;
|
||||
};
|
||||
|
||||
} // namespace Core::Devtools
|
||||
|
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3.8 KiB |
@ -1459,10 +1459,6 @@ bool MainWindow::eventFilter(QObject* obj, QEvent* event) {
|
||||
}
|
||||
|
||||
void MainWindow::StartEmulator(std::filesystem::path path) {
|
||||
if (isGameRunning) {
|
||||
QMessageBox::critical(nullptr, tr("Run Game"), QString(tr("Game is already running!")));
|
||||
return;
|
||||
}
|
||||
isGameRunning = true;
|
||||
#ifdef __APPLE__
|
||||
// SDL on macOS requires main thread.
|
||||
|
@ -241,7 +241,7 @@ public:
|
||||
keyboardButton->setIconSize(QSize(50, 50));
|
||||
restartButton = new QPushButton(centralWidget);
|
||||
restartButton->setFlat(true);
|
||||
restartButton->setIcon(QIcon(":images/refresh_icon.png"));
|
||||
restartButton->setIcon(QIcon(":images/restart_game_icon.png"));
|
||||
restartButton->setIconSize(QSize(40, 40));
|
||||
|
||||
sizeSliderContainer = new QWidget(centralWidget);
|
||||
|
@ -16,7 +16,7 @@
|
||||
<file>images/exit_icon.png</file>
|
||||
<file>images/settings_icon.png</file>
|
||||
<file>images/controller_icon.png</file>
|
||||
<file>images/refresh_icon.png</file>
|
||||
<file>images/restart_game_icon.png</file>
|
||||
<file>images/update_icon.png</file>
|
||||
<file>images/list_mode_icon.png</file>
|
||||
<file>images/flag_jp.png</file>
|
||||
|
Loading…
Reference in New Issue
Block a user