mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-23 16:39:43 +00:00
Merge pull request #13953 from TryTwo/add_osd_tab
Qt Settings: Transfer OSD settings to a new OSD pane.
This commit is contained in:
commit
e8d9c124e5
19 changed files with 351 additions and 191 deletions
|
@ -512,6 +512,7 @@ const Info<bool> MAIN_MOVIE_DUMP_FRAMES_SILENT{{System::Main, "Movie", "DumpFram
|
|||
const Info<bool> MAIN_MOVIE_SHOW_INPUT_DISPLAY{{System::Main, "Movie", "ShowInputDisplay"}, false};
|
||||
const Info<bool> MAIN_MOVIE_SHOW_RTC{{System::Main, "Movie", "ShowRTC"}, false};
|
||||
const Info<bool> MAIN_MOVIE_SHOW_RERECORD{{System::Main, "Movie", "ShowRerecord"}, false};
|
||||
const Info<bool> MAIN_MOVIE_SHOW_OSD{{System::Main, "Movie", "ShowMovieWindow"}, false};
|
||||
|
||||
// Main.Input
|
||||
|
||||
|
|
|
@ -327,6 +327,7 @@ extern const Info<bool> MAIN_MOVIE_DUMP_FRAMES_SILENT;
|
|||
extern const Info<bool> MAIN_MOVIE_SHOW_INPUT_DISPLAY;
|
||||
extern const Info<bool> MAIN_MOVIE_SHOW_RTC;
|
||||
extern const Info<bool> MAIN_MOVIE_SHOW_RERECORD;
|
||||
extern const Info<bool> MAIN_MOVIE_SHOW_OSD;
|
||||
|
||||
// Main.Input
|
||||
|
||||
|
|
|
@ -369,6 +369,8 @@ add_executable(dolphin-emu
|
|||
Settings/GeneralPane.h
|
||||
Settings/InterfacePane.cpp
|
||||
Settings/InterfacePane.h
|
||||
Settings/OnScreenDisplayPane.cpp
|
||||
Settings/OnScreenDisplayPane.h
|
||||
Settings/PathPane.cpp
|
||||
Settings/PathPane.h
|
||||
Settings/USBDevicePicker.cpp
|
||||
|
|
|
@ -46,57 +46,25 @@ void AdvancedWidget::CreateWidgets()
|
|||
|
||||
auto* main_layout = new QVBoxLayout;
|
||||
|
||||
// Performance
|
||||
auto* performance_box = new QGroupBox(tr("Performance Statistics"));
|
||||
auto* performance_layout = new QGridLayout();
|
||||
performance_box->setLayout(performance_layout);
|
||||
|
||||
m_show_fps = new ConfigBool(tr("Show FPS"), Config::GFX_SHOW_FPS, m_game_layer);
|
||||
m_show_ftimes = new ConfigBool(tr("Show Frame Times"), Config::GFX_SHOW_FTIMES, m_game_layer);
|
||||
m_show_vps = new ConfigBool(tr("Show VPS"), Config::GFX_SHOW_VPS, m_game_layer);
|
||||
m_show_vtimes = new ConfigBool(tr("Show VBlank Times"), Config::GFX_SHOW_VTIMES, m_game_layer);
|
||||
m_show_graphs =
|
||||
new ConfigBool(tr("Show Performance Graphs"), Config::GFX_SHOW_GRAPHS, m_game_layer);
|
||||
m_show_speed = new ConfigBool(tr("Show % Speed"), Config::GFX_SHOW_SPEED, m_game_layer);
|
||||
m_show_speed_colors =
|
||||
new ConfigBool(tr("Show Speed Colors"), Config::GFX_SHOW_SPEED_COLORS, m_game_layer);
|
||||
m_perf_samp_window = new ConfigInteger(0, 10000, Config::GFX_PERF_SAMP_WINDOW, m_game_layer, 100);
|
||||
m_perf_samp_window->SetTitle(tr("Performance Sample Window (ms)"));
|
||||
m_log_render_time = new ConfigBool(tr("Log Render Time to File"),
|
||||
Config::GFX_LOG_RENDER_TIME_TO_FILE, m_game_layer);
|
||||
|
||||
performance_layout->addWidget(m_show_fps, 0, 0);
|
||||
performance_layout->addWidget(m_show_ftimes, 0, 1);
|
||||
performance_layout->addWidget(m_show_vps, 1, 0);
|
||||
performance_layout->addWidget(m_show_vtimes, 1, 1);
|
||||
performance_layout->addWidget(m_show_speed, 2, 0);
|
||||
performance_layout->addWidget(m_show_graphs, 2, 1);
|
||||
performance_layout->addWidget(new QLabel(tr("Performance Sample Window (ms):")), 3, 0);
|
||||
performance_layout->addWidget(m_perf_samp_window, 3, 1);
|
||||
performance_layout->addWidget(m_log_render_time, 4, 0);
|
||||
performance_layout->addWidget(m_show_speed_colors, 4, 1);
|
||||
|
||||
// Debugging
|
||||
auto* debugging_box = new QGroupBox(tr("Debugging"));
|
||||
auto* debugging_layout = new QGridLayout();
|
||||
debugging_box->setLayout(debugging_layout);
|
||||
|
||||
m_log_render_time = new ConfigBool(tr("Log Render Time to File"),
|
||||
Config::GFX_LOG_RENDER_TIME_TO_FILE, m_game_layer);
|
||||
|
||||
m_enable_wireframe =
|
||||
new ConfigBool(tr("Enable Wireframe"), Config::GFX_ENABLE_WIREFRAME, m_game_layer);
|
||||
m_show_statistics =
|
||||
new ConfigBool(tr("Show Statistics"), Config::GFX_OVERLAY_STATS, m_game_layer);
|
||||
m_show_proj_statistics = new ConfigBool(tr("Show Projection Statistics"),
|
||||
Config::GFX_OVERLAY_PROJ_STATS, m_game_layer);
|
||||
m_enable_format_overlay =
|
||||
new ConfigBool(tr("Texture Format Overlay"), Config::GFX_TEXFMT_OVERLAY_ENABLE, m_game_layer);
|
||||
m_enable_api_validation = new ConfigBool(tr("Enable API Validation Layers"),
|
||||
Config::GFX_ENABLE_VALIDATION_LAYER, m_game_layer);
|
||||
|
||||
debugging_layout->addWidget(m_enable_wireframe, 0, 0);
|
||||
debugging_layout->addWidget(m_show_statistics, 0, 1);
|
||||
debugging_layout->addWidget(m_enable_format_overlay, 1, 0);
|
||||
debugging_layout->addWidget(m_show_proj_statistics, 1, 1);
|
||||
debugging_layout->addWidget(m_enable_api_validation, 2, 0);
|
||||
debugging_layout->addWidget(m_enable_format_overlay, 0, 1);
|
||||
debugging_layout->addWidget(m_enable_api_validation, 1, 0);
|
||||
debugging_layout->addWidget(m_log_render_time, 1, 1);
|
||||
|
||||
// Utility
|
||||
auto* utility_box = new QGroupBox(tr("Utility"));
|
||||
|
@ -226,7 +194,6 @@ void AdvancedWidget::CreateWidgets()
|
|||
experimental_layout->addWidget(m_defer_efb_access_invalidation, 0, 0);
|
||||
experimental_layout->addWidget(m_manual_texture_sampling, 0, 1);
|
||||
|
||||
main_layout->addWidget(performance_box);
|
||||
main_layout->addWidget(debugging_box);
|
||||
main_layout->addWidget(utility_box);
|
||||
main_layout->addWidget(texture_dump_box);
|
||||
|
@ -269,53 +236,9 @@ void AdvancedWidget::OnEmulationStateChanged(bool running)
|
|||
|
||||
void AdvancedWidget::AddDescriptions()
|
||||
{
|
||||
static const char TR_SHOW_FPS_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows the number of distinct frames rendered per second as a measure of "
|
||||
"visual smoothness.<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_FTIMES_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows the average time in ms between each distinct rendered frame alongside "
|
||||
"the standard deviation.<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_VPS_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows the number of frames rendered per second as a measure of "
|
||||
"emulation speed.<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_VTIMES_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows the average time in ms between each rendered frame alongside "
|
||||
"the standard deviation.<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_GRAPHS_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows frametime graph along with statistics as a representation of "
|
||||
"emulation performance.<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_SPEED_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows the % speed of emulation compared to full speed."
|
||||
"<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_SPEED_COLORS_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Changes the color of the FPS counter depending on emulation speed."
|
||||
"<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"checked.</dolphin_emphasis>");
|
||||
static const char TR_PERF_SAMP_WINDOW_DESCRIPTION[] =
|
||||
QT_TR_NOOP("The amount of time the FPS and VPS counters will sample over."
|
||||
"<br><br>The higher the value, the more stable the FPS/VPS counter will be, "
|
||||
"but the slower it will be to update."
|
||||
"<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"at 1000ms.</dolphin_emphasis>");
|
||||
static const char TR_LOG_RENDERTIME_DESCRIPTION[] = QT_TR_NOOP(
|
||||
"Logs the render time of every frame to User/Logs/render_time.txt.<br><br>Use this "
|
||||
"feature to measure Dolphin's performance.<br><br><dolphin_emphasis>If "
|
||||
"unsure, leave this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_WIREFRAME_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Renders the scene as a wireframe.<br><br><dolphin_emphasis>If unsure, leave "
|
||||
"this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_STATS_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows various rendering statistics.<br><br><dolphin_emphasis>If unsure, "
|
||||
"leave this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_PROJ_STATS_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows various projection statistics.<br><br><dolphin_emphasis>If unsure, "
|
||||
"leave this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_TEXTURE_FORMAT_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Modifies textures to show the format they're encoded in.<br><br>May require "
|
||||
"an emulation reset to apply.<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
|
@ -325,6 +248,10 @@ void AdvancedWidget::AddDescriptions()
|
|||
"debugging graphical issues. On the Vulkan and D3D backends, this also enables "
|
||||
"debug symbols for the compiled shaders.<br><br><dolphin_emphasis>If unsure, "
|
||||
"leave this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_LOG_RENDERTIME_DESCRIPTION[] = QT_TR_NOOP(
|
||||
"Logs the render time of every frame to User/Logs/render_time.txt.<br><br>Use this "
|
||||
"feature to measure Dolphin's performance.<br><br><dolphin_emphasis>If "
|
||||
"unsure, leave this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_DUMP_TEXTURE_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Dumps decoded game textures based on the other flags to "
|
||||
"User/Dump/Textures/<game_id>/.<br><br><dolphin_emphasis>If unsure, leave "
|
||||
|
@ -443,21 +370,10 @@ void AdvancedWidget::AddDescriptions()
|
|||
static const char IF_UNSURE_UNCHECKED[] =
|
||||
QT_TR_NOOP("<dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
|
||||
|
||||
m_show_fps->SetDescription(tr(TR_SHOW_FPS_DESCRIPTION));
|
||||
m_show_ftimes->SetDescription(tr(TR_SHOW_FTIMES_DESCRIPTION));
|
||||
m_show_vps->SetDescription(tr(TR_SHOW_VPS_DESCRIPTION));
|
||||
m_show_vtimes->SetDescription(tr(TR_SHOW_VTIMES_DESCRIPTION));
|
||||
m_show_graphs->SetDescription(tr(TR_SHOW_GRAPHS_DESCRIPTION));
|
||||
m_show_speed->SetDescription(tr(TR_SHOW_SPEED_DESCRIPTION));
|
||||
m_log_render_time->SetDescription(tr(TR_LOG_RENDERTIME_DESCRIPTION));
|
||||
m_show_speed_colors->SetDescription(tr(TR_SHOW_SPEED_COLORS_DESCRIPTION));
|
||||
|
||||
m_enable_wireframe->SetDescription(tr(TR_WIREFRAME_DESCRIPTION));
|
||||
m_show_statistics->SetDescription(tr(TR_SHOW_STATS_DESCRIPTION));
|
||||
m_show_proj_statistics->SetDescription(tr(TR_SHOW_PROJ_STATS_DESCRIPTION));
|
||||
m_enable_format_overlay->SetDescription(tr(TR_TEXTURE_FORMAT_DESCRIPTION));
|
||||
m_enable_api_validation->SetDescription(tr(TR_VALIDATION_LAYER_DESCRIPTION));
|
||||
m_perf_samp_window->SetDescription(tr(TR_PERF_SAMP_WINDOW_DESCRIPTION));
|
||||
m_log_render_time->SetDescription(tr(TR_LOG_RENDERTIME_DESCRIPTION));
|
||||
m_dump_textures->SetDescription(tr(TR_DUMP_TEXTURE_DESCRIPTION));
|
||||
m_dump_mip_textures->SetDescription(tr(TR_DUMP_MIP_TEXTURE_DESCRIPTION));
|
||||
m_dump_base_textures->SetDescription(tr(TR_DUMP_BASE_TEXTURE_DESCRIPTION));
|
||||
|
|
|
@ -30,18 +30,8 @@ private:
|
|||
|
||||
// Debugging
|
||||
ConfigBool* m_enable_wireframe;
|
||||
ConfigBool* m_show_statistics;
|
||||
ConfigBool* m_show_proj_statistics;
|
||||
ConfigBool* m_enable_format_overlay;
|
||||
ConfigBool* m_enable_api_validation;
|
||||
ConfigBool* m_show_fps;
|
||||
ConfigBool* m_show_ftimes;
|
||||
ConfigBool* m_show_vps;
|
||||
ConfigBool* m_show_vtimes;
|
||||
ConfigBool* m_show_graphs;
|
||||
ConfigBool* m_show_speed;
|
||||
ConfigBool* m_show_speed_colors;
|
||||
ConfigInteger* m_perf_samp_window;
|
||||
ConfigBool* m_log_render_time;
|
||||
|
||||
// Utility
|
||||
|
|
|
@ -108,22 +108,15 @@ void GeneralWidget::CreateWidgets()
|
|||
auto* m_options_box = new QGroupBox(tr("Other"));
|
||||
auto* m_options_layout = new QGridLayout();
|
||||
|
||||
m_show_ping =
|
||||
new ConfigBool(tr("Show NetPlay Ping"), Config::GFX_SHOW_NETPLAY_PING, m_game_layer);
|
||||
m_autoadjust_window_size = new ConfigBool(tr("Auto-Adjust Window Size"),
|
||||
Config::MAIN_RENDER_WINDOW_AUTOSIZE, m_game_layer);
|
||||
m_show_messages =
|
||||
new ConfigBool(tr("Show NetPlay Messages"), Config::GFX_SHOW_NETPLAY_MESSAGES, m_game_layer);
|
||||
m_render_main_window =
|
||||
new ConfigBool(tr("Render to Main Window"), Config::MAIN_RENDER_TO_MAIN, m_game_layer);
|
||||
|
||||
m_options_box->setLayout(m_options_layout);
|
||||
|
||||
m_options_layout->addWidget(m_render_main_window, 0, 0);
|
||||
m_options_layout->addWidget(m_autoadjust_window_size, 1, 0);
|
||||
|
||||
m_options_layout->addWidget(m_show_messages, 0, 1);
|
||||
m_options_layout->addWidget(m_show_ping, 1, 1);
|
||||
m_options_layout->addWidget(m_autoadjust_window_size, 0, 1);
|
||||
|
||||
// Other
|
||||
auto* shader_compilation_box = new QGroupBox(tr("Shader Compilation"));
|
||||
|
@ -268,13 +261,6 @@ void GeneralWidget::AddDescriptions()
|
|||
"if emulation speed is below 100%.<br><br><dolphin_emphasis>If unsure, leave "
|
||||
"this "
|
||||
"unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_NETPLAY_PING_DESCRIPTION[] = QT_TR_NOOP(
|
||||
"Shows the player's maximum ping while playing on "
|
||||
"NetPlay.<br><br><dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_NETPLAY_MESSAGES_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows chat messages, buffer changes, and desync alerts "
|
||||
"while playing NetPlay.<br><br><dolphin_emphasis>If unsure, leave "
|
||||
"this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHADER_COMPILE_SPECIALIZED_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Ubershaders are never used. Stuttering will occur during shader "
|
||||
"compilation, but GPU demands are low.<br><br>Recommended for low-end hardware. "
|
||||
|
@ -320,12 +306,8 @@ void GeneralWidget::AddDescriptions()
|
|||
|
||||
m_enable_fullscreen->SetDescription(tr(TR_FULLSCREEN_DESCRIPTION));
|
||||
|
||||
m_show_ping->SetDescription(tr(TR_SHOW_NETPLAY_PING_DESCRIPTION));
|
||||
|
||||
m_autoadjust_window_size->SetDescription(tr(TR_AUTOSIZE_DESCRIPTION));
|
||||
|
||||
m_show_messages->SetDescription(tr(TR_SHOW_NETPLAY_MESSAGES_DESCRIPTION));
|
||||
|
||||
m_render_main_window->SetDescription(tr(TR_RENDER_TO_MAINWINDOW_DESCRIPTION));
|
||||
|
||||
m_shader_compilation_mode[0]->SetDescription(tr(TR_SHADER_COMPILE_SPECIALIZED_DESCRIPTION));
|
||||
|
|
|
@ -52,10 +52,9 @@ private:
|
|||
ConfigBool* m_enable_fullscreen;
|
||||
|
||||
// Options
|
||||
ConfigBool* m_show_ping;
|
||||
ConfigBool* m_autoadjust_window_size;
|
||||
ConfigBool* m_show_messages;
|
||||
ConfigBool* m_render_main_window;
|
||||
|
||||
std::array<ConfigRadioInt*, 4> m_shader_compilation_mode{};
|
||||
ConfigBool* m_wait_for_shaders;
|
||||
int m_previous_backend = 0;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "DolphinQt/Settings/GameCubePane.h"
|
||||
#include "DolphinQt/Settings/GeneralPane.h"
|
||||
#include "DolphinQt/Settings/InterfacePane.h"
|
||||
#include "DolphinQt/Settings/OnScreenDisplayPane.h"
|
||||
#include "DolphinQt/Settings/PathPane.h"
|
||||
#include "DolphinQt/Settings/WiiPane.h"
|
||||
|
||||
|
@ -129,6 +130,7 @@ SettingsWindow::SettingsWindow(MainWindow* parent) : StackedSettingsWindow{paren
|
|||
AddPane(new GraphicsPane{parent, nullptr}, tr("Graphics"));
|
||||
AddWrappedPane(new ControllersPane, tr("Controllers"));
|
||||
AddWrappedPane(new InterfacePane, tr("Interface"));
|
||||
AddWrappedPane(new OnScreenDisplayPane, tr("On-Screen Display"));
|
||||
AddWrappedPane(new AudioPane, tr("Audio"));
|
||||
AddWrappedPane(new PathPane, tr("Paths"));
|
||||
AddWrappedPane(new GameCubePane, tr("GameCube"));
|
||||
|
|
|
@ -38,6 +38,7 @@ enum class SettingsWindowPaneIndex : int
|
|||
Graphics,
|
||||
Controllers,
|
||||
Interface,
|
||||
OnScreenDisplay,
|
||||
Audio,
|
||||
Paths,
|
||||
GameCube,
|
||||
|
|
|
@ -218,6 +218,7 @@
|
|||
<ClCompile Include="Settings\GameCubePane.cpp" />
|
||||
<ClCompile Include="Settings\GeneralPane.cpp" />
|
||||
<ClCompile Include="Settings\InterfacePane.cpp" />
|
||||
<ClCompile Include="Settings\OnScreenDisplayPane.cpp" />
|
||||
<ClCompile Include="Settings\PathPane.cpp" />
|
||||
<ClCompile Include="Settings\USBDevicePicker.cpp" />
|
||||
<ClCompile Include="Settings\WiiPane.cpp" />
|
||||
|
@ -268,6 +269,7 @@
|
|||
<ClInclude Include="QtUtils\WrapInScrollArea.h" />
|
||||
<ClInclude Include="ResourcePackManager.h" />
|
||||
<ClInclude Include="Resources.h" />
|
||||
<ClInclude Include="Settings\OnScreenDisplayPane.h" />
|
||||
<ClInclude Include="SkylanderPortal\SkylanderModifyDialog.h" />
|
||||
<ClInclude Include="TAS\TASControlState.h" />
|
||||
<ClInclude Include="TAS\TASSlider.h" />
|
||||
|
|
|
@ -583,6 +583,7 @@ void MainWindow::ConnectMenuBar()
|
|||
connect(m_menu_bar, &MenuBar::StopRecording, this, &MainWindow::OnStopRecording);
|
||||
connect(m_menu_bar, &MenuBar::ExportRecording, this, &MainWindow::OnExportRecording);
|
||||
connect(m_menu_bar, &MenuBar::ShowTASInput, this, &MainWindow::ShowTASInput);
|
||||
connect(m_menu_bar, &MenuBar::ConfigureOSD, this, &MainWindow::ShowOSDWindow);
|
||||
|
||||
// View
|
||||
connect(m_menu_bar, &MenuBar::ShowList, m_game_list, &GameList::SetListView);
|
||||
|
@ -1327,6 +1328,12 @@ void MainWindow::ShowGeneralWindow()
|
|||
m_settings_window->SelectPane(SettingsWindowPaneIndex::General);
|
||||
}
|
||||
|
||||
void MainWindow::ShowOSDWindow()
|
||||
{
|
||||
ShowSettingsWindow();
|
||||
m_settings_window->SelectPane(SettingsWindowPaneIndex::OnScreenDisplay);
|
||||
}
|
||||
|
||||
void MainWindow::ShowAboutDialog()
|
||||
{
|
||||
AboutDialog about{this};
|
||||
|
|
|
@ -208,6 +208,7 @@ private:
|
|||
void OnActivateChat();
|
||||
void OnRequestGolfControl();
|
||||
void ShowTASInput();
|
||||
void ShowOSDWindow();
|
||||
|
||||
void ChangeDisc();
|
||||
void EjectDisc();
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <QFontDialog>
|
||||
#include <QInputDialog>
|
||||
#include <QMap>
|
||||
#include <QSignalBlocker>
|
||||
#include <QUrl>
|
||||
|
||||
#include <fmt/format.h>
|
||||
|
@ -66,6 +65,7 @@
|
|||
#include "DolphinQt/QtUtils/NonAutodismissibleMenu.h"
|
||||
#include "DolphinQt/QtUtils/ParallelProgressDialog.h"
|
||||
#include "DolphinQt/QtUtils/QueueOnObject.h"
|
||||
#include "DolphinQt/QtUtils/SignalBlocking.h"
|
||||
#include "DolphinQt/Settings.h"
|
||||
#include "DolphinQt/Updater.h"
|
||||
|
||||
|
@ -176,8 +176,9 @@ void MenuBar::OnEmulationStateChanged(Core::State state)
|
|||
|
||||
void MenuBar::OnConfigChanged()
|
||||
{
|
||||
const QSignalBlocker blocker(m_jit_profile_blocks);
|
||||
m_jit_profile_blocks->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_ENABLE_PROFILING));
|
||||
SignalBlocking(m_jit_profile_blocks)
|
||||
->setChecked(Config::Get(Config::MAIN_DEBUG_JIT_ENABLE_PROFILING));
|
||||
SignalBlocking(m_movie_window)->setChecked(Config::Get(Config::MAIN_MOVIE_SHOW_OSD));
|
||||
}
|
||||
|
||||
void MenuBar::OnDebugModeToggled(bool enabled)
|
||||
|
@ -845,36 +846,13 @@ void MenuBar::AddMovieMenu()
|
|||
connect(pause_at_end, &QAction::toggled,
|
||||
[](bool value) { Config::SetBaseOrCurrent(Config::MAIN_MOVIE_PAUSE_MOVIE, value); });
|
||||
|
||||
auto* rerecord_counter = movie_menu->addAction(tr("Show Rerecord Counter"));
|
||||
rerecord_counter->setCheckable(true);
|
||||
rerecord_counter->setChecked(Config::Get(Config::MAIN_MOVIE_SHOW_RERECORD));
|
||||
connect(rerecord_counter, &QAction::toggled,
|
||||
[](bool value) { Config::SetBaseOrCurrent(Config::MAIN_MOVIE_SHOW_RERECORD, value); });
|
||||
m_movie_window = movie_menu->addAction(tr("Enable Movie Window"));
|
||||
m_movie_window->setCheckable(true);
|
||||
m_movie_window->setChecked(Config::Get(Config::MAIN_MOVIE_SHOW_OSD));
|
||||
connect(m_movie_window, &QAction::toggled,
|
||||
[](bool value) { Config::SetBaseOrCurrent(Config::MAIN_MOVIE_SHOW_OSD, value); });
|
||||
|
||||
auto* lag_counter = movie_menu->addAction(tr("Show Lag Counter"));
|
||||
lag_counter->setCheckable(true);
|
||||
lag_counter->setChecked(Config::Get(Config::MAIN_SHOW_LAG));
|
||||
connect(lag_counter, &QAction::toggled,
|
||||
[](bool value) { Config::SetBaseOrCurrent(Config::MAIN_SHOW_LAG, value); });
|
||||
|
||||
auto* frame_counter = movie_menu->addAction(tr("Show Frame Counter"));
|
||||
frame_counter->setCheckable(true);
|
||||
frame_counter->setChecked(Config::Get(Config::MAIN_SHOW_FRAME_COUNT));
|
||||
connect(frame_counter, &QAction::toggled,
|
||||
[](bool value) { Config::SetBaseOrCurrent(Config::MAIN_SHOW_FRAME_COUNT, value); });
|
||||
|
||||
auto* input_display = movie_menu->addAction(tr("Show Input Display"));
|
||||
input_display->setCheckable(true);
|
||||
input_display->setChecked(Config::Get(Config::MAIN_MOVIE_SHOW_INPUT_DISPLAY));
|
||||
connect(input_display, &QAction::toggled, [](bool value) {
|
||||
Config::SetBaseOrCurrent(Config::MAIN_MOVIE_SHOW_INPUT_DISPLAY, value);
|
||||
});
|
||||
|
||||
auto* system_clock = movie_menu->addAction(tr("Show System Clock"));
|
||||
system_clock->setCheckable(true);
|
||||
system_clock->setChecked(Config::Get(Config::MAIN_MOVIE_SHOW_RTC));
|
||||
connect(system_clock, &QAction::toggled,
|
||||
[](bool value) { Config::SetBaseOrCurrent(Config::MAIN_MOVIE_SHOW_RTC, value); });
|
||||
movie_menu->addAction(tr("Customize Movie Window"), this, &MenuBar::ConfigureOSD);
|
||||
|
||||
movie_menu->addSeparator();
|
||||
|
||||
|
|
|
@ -132,6 +132,8 @@ signals:
|
|||
void RecordingStatusChanged(bool recording);
|
||||
void ReadOnlyModeChanged(bool read_only);
|
||||
|
||||
void ConfigureOSD();
|
||||
|
||||
private:
|
||||
void OnEmulationStateChanged(Core::State state);
|
||||
void OnConfigChanged();
|
||||
|
@ -251,6 +253,7 @@ private:
|
|||
QAction* m_recording_start;
|
||||
QAction* m_recording_stop;
|
||||
QAction* m_recording_read_only;
|
||||
QAction* m_movie_window;
|
||||
|
||||
// Options
|
||||
QAction* m_boot_to_pause;
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigBool.h"
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigChoice.h"
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigInteger.h"
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigRadio.h"
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipCheckBox.h"
|
||||
#include "DolphinQt/Config/ToolTipControls/ToolTipComboBox.h"
|
||||
|
@ -197,16 +196,6 @@ void InterfacePane::CreateInGame()
|
|||
m_checkbox_confirm_on_stop = new ConfigBool(tr("Confirm on Stop"), Config::MAIN_CONFIRM_ON_STOP);
|
||||
m_checkbox_use_panic_handlers =
|
||||
new ConfigBool(tr("Use Panic Handlers"), Config::MAIN_USE_PANIC_HANDLERS);
|
||||
m_checkbox_enable_osd =
|
||||
new ConfigBool(tr("Show On-Screen Display Messages"), Config::MAIN_OSD_MESSAGES);
|
||||
|
||||
m_osd_font_size = new ConfigInteger(12, 40, Config::MAIN_OSD_FONT_SIZE);
|
||||
m_osd_font_size->setMinimumWidth(m_osd_font_size->sizeHint().width() * 2);
|
||||
auto* font_size_layout = new QHBoxLayout;
|
||||
font_size_layout->addWidget(new QLabel(tr("On-Screen Display Font Size: ")));
|
||||
font_size_layout->addWidget(m_osd_font_size);
|
||||
font_size_layout->addStretch();
|
||||
|
||||
m_checkbox_show_active_title =
|
||||
new ConfigBool(tr("Show Active Title in Window Title"), Config::MAIN_SHOW_ACTIVE_TITLE);
|
||||
m_checkbox_pause_on_focus_lost =
|
||||
|
@ -236,8 +225,6 @@ void InterfacePane::CreateInGame()
|
|||
groupbox_layout->addWidget(m_checkbox_top_window);
|
||||
groupbox_layout->addWidget(m_checkbox_confirm_on_stop);
|
||||
groupbox_layout->addWidget(m_checkbox_use_panic_handlers);
|
||||
groupbox_layout->addWidget(m_checkbox_enable_osd);
|
||||
groupbox_layout->addLayout(font_size_layout);
|
||||
groupbox_layout->addWidget(m_checkbox_show_active_title);
|
||||
groupbox_layout->addWidget(m_checkbox_pause_on_focus_lost);
|
||||
groupbox_layout->addWidget(mouse_groupbox);
|
||||
|
@ -378,14 +365,6 @@ void InterfacePane::AddDescriptions()
|
|||
"present choices on how to proceed. With this option disabled, Dolphin will "
|
||||
"\"ignore\" all errors. Emulation will not be halted and you will not be notified."
|
||||
"<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
|
||||
static constexpr char TR_ENABLE_OSD_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows on-screen display messages over the render window. These messages "
|
||||
"disappear after several seconds."
|
||||
"<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
|
||||
static const char TR_OSD_FONT_SIZE_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Changes the font size of the On Screen Display. Affects features such as the FPS"
|
||||
"display, TAS movie window, and netplay chat."
|
||||
"<br><br><dolphin_emphasis>If unsure, leave this at 13.</dolphin_emphasis>");
|
||||
static constexpr char TR_SHOW_ACTIVE_TITLE_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows the active game title in the render window's title bar."
|
||||
"<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
|
||||
|
@ -433,10 +412,6 @@ void InterfacePane::AddDescriptions()
|
|||
|
||||
m_checkbox_use_panic_handlers->SetDescription(tr(TR_USE_PANIC_HANDLERS_DESCRIPTION));
|
||||
|
||||
m_checkbox_enable_osd->SetDescription(tr(TR_ENABLE_OSD_DESCRIPTION));
|
||||
|
||||
m_osd_font_size->SetDescription(tr(TR_OSD_FONT_SIZE_DESCRIPTION));
|
||||
|
||||
m_checkbox_show_active_title->SetDescription(tr(TR_SHOW_ACTIVE_TITLE_DESCRIPTION));
|
||||
|
||||
m_checkbox_pause_on_focus_lost->SetDescription(tr(TR_PAUSE_ON_FOCUS_LOST_DESCRIPTION));
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
#include <QWidget>
|
||||
|
||||
class ConfigBool;
|
||||
class ConfigInteger;
|
||||
class ConfigRadioInt;
|
||||
class ConfigStringChoice;
|
||||
class QLabel;
|
||||
|
@ -54,8 +53,6 @@ private:
|
|||
|
||||
ConfigBool* m_checkbox_confirm_on_stop;
|
||||
ConfigBool* m_checkbox_use_panic_handlers;
|
||||
ConfigBool* m_checkbox_enable_osd;
|
||||
ConfigInteger* m_osd_font_size;
|
||||
ConfigBool* m_checkbox_show_active_title;
|
||||
ConfigBool* m_checkbox_pause_on_focus_lost;
|
||||
ConfigRadioInt* m_radio_cursor_visible_movement;
|
||||
|
|
255
Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp
Normal file
255
Source/Core/DolphinQt/Settings/OnScreenDisplayPane.cpp
Normal file
|
@ -0,0 +1,255 @@
|
|||
// Copyright 2025 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include "DolphinQt/Settings/OnScreenDisplayPane.h"
|
||||
|
||||
#include <QGridLayout>
|
||||
#include <QGroupBox>
|
||||
#include <QLabel>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
|
||||
#include "Core/Config/GraphicsSettings.h"
|
||||
#include "Core/Config/MainSettings.h"
|
||||
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigBool.h"
|
||||
#include "DolphinQt/Config/ConfigControls/ConfigInteger.h"
|
||||
|
||||
OnScreenDisplayPane::OnScreenDisplayPane(QWidget* parent) : QWidget(parent)
|
||||
{
|
||||
CreateLayout();
|
||||
ConnectLayout();
|
||||
AddDescriptions();
|
||||
}
|
||||
|
||||
void OnScreenDisplayPane::CreateLayout()
|
||||
{
|
||||
// General
|
||||
auto* general_box = new QGroupBox(tr("General"));
|
||||
auto* general_layout = new QGridLayout();
|
||||
general_box->setLayout(general_layout);
|
||||
|
||||
m_enable_osd = new ConfigBool(tr("Show Messages"), Config::MAIN_OSD_MESSAGES);
|
||||
m_font_size = new ConfigInteger(12, 40, Config::MAIN_OSD_FONT_SIZE);
|
||||
|
||||
general_layout->addWidget(m_enable_osd, 0, 0);
|
||||
general_layout->addWidget(new QLabel(tr("Font Size:")), 1, 0);
|
||||
general_layout->addWidget(m_font_size, 1, 1);
|
||||
|
||||
// Performance
|
||||
auto* performance_box = new QGroupBox(tr("Performance Statistics"));
|
||||
auto* performance_layout = new QGridLayout();
|
||||
performance_box->setLayout(performance_layout);
|
||||
|
||||
m_show_fps = new ConfigBool(tr("Show FPS"), Config::GFX_SHOW_FPS);
|
||||
m_show_ftimes = new ConfigBool(tr("Show Frame Times"), Config::GFX_SHOW_FTIMES);
|
||||
m_show_vps = new ConfigBool(tr("Show VPS"), Config::GFX_SHOW_VPS);
|
||||
m_show_vtimes = new ConfigBool(tr("Show VBlank Times"), Config::GFX_SHOW_VTIMES);
|
||||
m_show_speed = new ConfigBool(tr("Show % Speed"), Config::GFX_SHOW_SPEED);
|
||||
m_speed_colors = new ConfigBool(tr("Show Speed Colors"), Config::GFX_SHOW_SPEED_COLORS);
|
||||
m_show_graph = new ConfigBool(tr("Show Performance Graphs"), Config::GFX_SHOW_GRAPHS);
|
||||
m_graph_update_label = new QLabel(tr("Graph Update Rate (ms):"));
|
||||
m_graph_update_rate = new ConfigInteger(0, 10000, Config::GFX_PERF_SAMP_WINDOW, 100);
|
||||
m_graph_update_rate->SetTitle(tr("Performance Sample Window (ms)"));
|
||||
|
||||
performance_layout->addWidget(m_show_fps, 0, 0);
|
||||
performance_layout->addWidget(m_show_ftimes, 0, 1);
|
||||
performance_layout->addWidget(m_show_vps, 1, 0);
|
||||
performance_layout->addWidget(m_show_vtimes, 1, 1);
|
||||
performance_layout->addWidget(m_show_speed, 2, 0);
|
||||
performance_layout->addWidget(m_speed_colors, 2, 1);
|
||||
performance_layout->addWidget(m_show_graph, 3, 0);
|
||||
performance_layout->addWidget(m_graph_update_label, 4, 0);
|
||||
performance_layout->addWidget(m_graph_update_rate, 4, 1);
|
||||
|
||||
// Movie
|
||||
auto* movie_box = new QGroupBox(tr("Movie Window"));
|
||||
auto* movie_layout = new QGridLayout();
|
||||
movie_box->setLayout(movie_layout);
|
||||
|
||||
m_movie_window = new ConfigBool(tr("Show Movie Window"), Config::MAIN_MOVIE_SHOW_OSD);
|
||||
m_rerecord_counter =
|
||||
new ConfigBool(tr("Show Rerecord Counter"), Config::MAIN_MOVIE_SHOW_RERECORD);
|
||||
m_lag_counter = new ConfigBool(tr("Show Lag Counter"), Config::MAIN_SHOW_LAG);
|
||||
m_frame_counter = new ConfigBool(tr("Show Frame Counter"), Config::MAIN_SHOW_FRAME_COUNT);
|
||||
m_input_display = new ConfigBool(tr("Show Input Display"), Config::MAIN_MOVIE_SHOW_INPUT_DISPLAY);
|
||||
m_system_clock = new ConfigBool(tr("Show System Clock"), Config::MAIN_MOVIE_SHOW_RTC);
|
||||
|
||||
movie_layout->addWidget(m_movie_window, 0, 0);
|
||||
movie_layout->addWidget(m_rerecord_counter, 1, 0);
|
||||
movie_layout->addWidget(m_lag_counter, 1, 1);
|
||||
movie_layout->addWidget(m_frame_counter, 2, 0);
|
||||
movie_layout->addWidget(m_input_display, 2, 1);
|
||||
movie_layout->addWidget(m_system_clock, 3, 0);
|
||||
|
||||
// NetPlay
|
||||
auto* netplay_box = new QGroupBox(tr("Netplay"));
|
||||
auto* netplay_layout = new QGridLayout();
|
||||
netplay_box->setLayout(netplay_layout);
|
||||
|
||||
m_show_ping = new ConfigBool(tr("Show NetPlay Ping"), Config::GFX_SHOW_NETPLAY_PING);
|
||||
m_show_chat = new ConfigBool(tr("Show NetPlay Chat"), Config::GFX_SHOW_NETPLAY_MESSAGES);
|
||||
|
||||
netplay_layout->addWidget(m_show_ping, 0, 0);
|
||||
netplay_layout->addWidget(m_show_chat, 0, 1);
|
||||
|
||||
// Debug
|
||||
auto* debug_box = new QGroupBox(tr("Debug"));
|
||||
auto* debug_layout = new QGridLayout();
|
||||
debug_box->setLayout(debug_layout);
|
||||
|
||||
m_show_statistics = new ConfigBool(tr("Show Statistics"), Config::GFX_OVERLAY_STATS);
|
||||
m_show_proj_statistics =
|
||||
new ConfigBool(tr("Show Projection Statistics"), Config::GFX_OVERLAY_PROJ_STATS);
|
||||
|
||||
debug_layout->addWidget(m_show_statistics, 0, 0);
|
||||
debug_layout->addWidget(m_show_proj_statistics, 0, 1);
|
||||
|
||||
// Stack GroupBoxes
|
||||
auto* main_layout = new QVBoxLayout;
|
||||
main_layout->addWidget(general_box);
|
||||
main_layout->addWidget(performance_box);
|
||||
main_layout->addWidget(movie_box);
|
||||
main_layout->addWidget(netplay_box);
|
||||
main_layout->addWidget(debug_box);
|
||||
main_layout->addStretch();
|
||||
setLayout(main_layout);
|
||||
}
|
||||
|
||||
void OnScreenDisplayPane::ConnectLayout()
|
||||
{
|
||||
// Disable graph options when graph is not visible.
|
||||
m_graph_update_rate->setEnabled(m_show_graph->isChecked());
|
||||
m_graph_update_label->setEnabled(m_show_graph->isChecked());
|
||||
connect(m_show_graph, &QCheckBox::toggled, this, [this](bool checked) {
|
||||
m_graph_update_rate->setEnabled(checked);
|
||||
m_graph_update_label->setEnabled(checked);
|
||||
});
|
||||
|
||||
// Disable movie window options when window is closed.
|
||||
auto enable_movie_items = [this](bool checked) {
|
||||
for (auto* widget :
|
||||
{m_rerecord_counter, m_frame_counter, m_lag_counter, m_system_clock, m_input_display})
|
||||
{
|
||||
widget->setEnabled(checked);
|
||||
}
|
||||
};
|
||||
|
||||
enable_movie_items(m_movie_window->isChecked());
|
||||
connect(m_movie_window, &QCheckBox::toggled, this, [this, enable_movie_items](bool checked) {
|
||||
enable_movie_items(m_movie_window->isChecked());
|
||||
});
|
||||
}
|
||||
|
||||
void OnScreenDisplayPane::AddDescriptions()
|
||||
{
|
||||
static constexpr char TR_ENABLE_OSD_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows on-screen display messages over the render window. These messages "
|
||||
"disappear after several seconds."
|
||||
"<br><br><dolphin_emphasis>If unsure, leave this checked.</dolphin_emphasis>");
|
||||
static const char TR_OSD_FONT_SIZE_DESCRIPTION[] = QT_TR_NOOP(
|
||||
"Changes the font size of the On-Screen Display. Affects features such as performance "
|
||||
"statistics, frame counter, and netplay chat.<br><br><dolphin_emphasis>If "
|
||||
"unsure, leave this at 13.</dolphin_emphasis>");
|
||||
|
||||
static const char TR_SHOW_FPS_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows the number of distinct frames rendered per second as a measure of "
|
||||
"visual smoothness.<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_FTIMES_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows the average time in ms between each distinct rendered frame alongside "
|
||||
"the standard deviation.<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_VPS_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows the number of frames rendered per second as a measure of "
|
||||
"emulation speed.<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_VTIMES_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows the average time in ms between each rendered frame alongside "
|
||||
"the standard deviation.<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_GRAPHS_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows frametime graph along with statistics as a representation of "
|
||||
"emulation performance.<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_SPEED_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows the % speed of emulation compared to full speed."
|
||||
"<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_SPEED_COLORS_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Changes the color of the FPS counter depending on emulation speed."
|
||||
"<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"checked.</dolphin_emphasis>");
|
||||
static const char TR_PERF_SAMP_WINDOW_DESCRIPTION[] =
|
||||
QT_TR_NOOP("The amount of time the FPS and VPS counters will sample over."
|
||||
"<br><br>The higher the value, the more stable the FPS/VPS counter will be, "
|
||||
"but the slower it will be to update."
|
||||
"<br><br><dolphin_emphasis>If unsure, leave this "
|
||||
"at 1000ms.</dolphin_emphasis>");
|
||||
static const char TR_LOG_RENDERTIME_DESCRIPTION[] = QT_TR_NOOP(
|
||||
"Logs the render time of every frame to User/Logs/render_time.txt.<br><br>Use this "
|
||||
"feature to measure Dolphin's performance.<br><br><dolphin_emphasis>If "
|
||||
"unsure, leave this unchecked.</dolphin_emphasis>");
|
||||
|
||||
static const char TR_SHOW_NETPLAY_PING_DESCRIPTION[] = QT_TR_NOOP(
|
||||
"Shows the player's maximum ping while playing on "
|
||||
"NetPlay.<br><br><dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_NETPLAY_MESSAGES_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows chat messages, buffer changes, and desync alerts "
|
||||
"while playing NetPlay.<br><br><dolphin_emphasis>If unsure, leave "
|
||||
"this unchecked.</dolphin_emphasis>");
|
||||
|
||||
static const char TR_MOVIE_WINDOW_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows a window that can be filled with information related to movie recordings. "
|
||||
"The other options in this group determine what appears in the window. "
|
||||
"<br><br><dolphin_emphasis>If unsure, leave this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_RERECORD_COUNTER_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows how many times the input recording has been overwritten by using "
|
||||
"savestates.<br><br><dolphin_emphasis>If unsure, leave "
|
||||
"this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_LAG_COUNTER_DESCRIPTION[] = QT_TR_NOOP(
|
||||
"Shows how many frames have occured without controller inputs being checked. Resets to 1 "
|
||||
"when inputs are processed. <br><br><dolphin_emphasis>If unsure, leave "
|
||||
"this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_FRAME_COUNTER_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows how many frames have passed. <br><br><dolphin_emphasis>If unsure, leave "
|
||||
"this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_INPUT_DISPLAY_DESCRIPTION[] = QT_TR_NOOP(
|
||||
"Shows the controls currently being input.<br><br><dolphin_emphasis>If unsure, leave "
|
||||
"this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SYSTEM_CLOCK_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows current system time.<br><br><dolphin_emphasis>If unsure, leave "
|
||||
"this unchecked.</dolphin_emphasis>");
|
||||
|
||||
static const char TR_SHOW_STATS_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows various rendering statistics.<br><br><dolphin_emphasis>If unsure, "
|
||||
"leave this unchecked.</dolphin_emphasis>");
|
||||
static const char TR_SHOW_PROJ_STATS_DESCRIPTION[] =
|
||||
QT_TR_NOOP("Shows various projection statistics.<br><br><dolphin_emphasis>If unsure, "
|
||||
"leave this unchecked.</dolphin_emphasis>");
|
||||
|
||||
m_enable_osd->SetDescription(tr(TR_ENABLE_OSD_DESCRIPTION));
|
||||
m_font_size->SetDescription(tr(TR_OSD_FONT_SIZE_DESCRIPTION));
|
||||
|
||||
m_show_fps->SetDescription(tr(TR_SHOW_FPS_DESCRIPTION));
|
||||
m_show_ftimes->SetDescription(tr(TR_SHOW_FTIMES_DESCRIPTION));
|
||||
m_show_vps->SetDescription(tr(TR_SHOW_VPS_DESCRIPTION));
|
||||
m_show_vtimes->SetDescription(tr(TR_SHOW_VTIMES_DESCRIPTION));
|
||||
m_show_graph->SetDescription(tr(TR_SHOW_GRAPHS_DESCRIPTION));
|
||||
m_show_speed->SetDescription(tr(TR_SHOW_SPEED_DESCRIPTION));
|
||||
m_graph_update_rate->SetDescription(tr(TR_PERF_SAMP_WINDOW_DESCRIPTION));
|
||||
m_speed_colors->SetDescription(tr(TR_SHOW_SPEED_COLORS_DESCRIPTION));
|
||||
|
||||
m_show_ping->SetDescription(tr(TR_SHOW_NETPLAY_PING_DESCRIPTION));
|
||||
m_show_chat->SetDescription(tr(TR_SHOW_NETPLAY_MESSAGES_DESCRIPTION));
|
||||
|
||||
m_movie_window->SetDescription(tr(TR_MOVIE_WINDOW_DESCRIPTION));
|
||||
m_rerecord_counter->SetDescription(tr(TR_RERECORD_COUNTER_DESCRIPTION));
|
||||
m_lag_counter->SetDescription(tr(TR_LAG_COUNTER_DESCRIPTION));
|
||||
m_frame_counter->SetDescription(tr(TR_FRAME_COUNTER_DESCRIPTION));
|
||||
m_input_display->SetDescription(tr(TR_INPUT_DISPLAY_DESCRIPTION));
|
||||
m_system_clock->SetDescription(tr(TR_SYSTEM_CLOCK_DESCRIPTION));
|
||||
|
||||
m_show_statistics->SetDescription(tr(TR_SHOW_STATS_DESCRIPTION));
|
||||
m_show_proj_statistics->SetDescription(tr(TR_SHOW_PROJ_STATS_DESCRIPTION));
|
||||
}
|
52
Source/Core/DolphinQt/Settings/OnScreenDisplayPane.h
Normal file
52
Source/Core/DolphinQt/Settings/OnScreenDisplayPane.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
// Copyright 2025 Dolphin Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class QLabel;
|
||||
class ConfigBool;
|
||||
class ConfigInteger;
|
||||
|
||||
class OnScreenDisplayPane final : public QWidget
|
||||
{
|
||||
public:
|
||||
explicit OnScreenDisplayPane(QWidget* parent = nullptr);
|
||||
|
||||
private:
|
||||
void CreateLayout();
|
||||
void ConnectLayout();
|
||||
void AddDescriptions();
|
||||
|
||||
// General
|
||||
ConfigBool* m_enable_osd;
|
||||
ConfigInteger* m_font_size;
|
||||
|
||||
// Performance
|
||||
ConfigBool* m_show_fps;
|
||||
ConfigBool* m_show_ftimes;
|
||||
ConfigBool* m_show_vps;
|
||||
ConfigBool* m_show_vtimes;
|
||||
ConfigBool* m_show_graph;
|
||||
ConfigBool* m_show_speed;
|
||||
ConfigBool* m_speed_colors;
|
||||
QLabel* m_graph_update_label;
|
||||
ConfigInteger* m_graph_update_rate;
|
||||
|
||||
// Movie window
|
||||
ConfigBool* m_movie_window;
|
||||
ConfigBool* m_rerecord_counter;
|
||||
ConfigBool* m_lag_counter;
|
||||
ConfigBool* m_frame_counter;
|
||||
ConfigBool* m_input_display;
|
||||
ConfigBool* m_system_clock;
|
||||
|
||||
// Netplay
|
||||
ConfigBool* m_show_ping;
|
||||
ConfigBool* m_show_chat;
|
||||
|
||||
// Debug
|
||||
ConfigBool* m_show_statistics;
|
||||
ConfigBool* m_show_proj_statistics;
|
||||
};
|
|
@ -256,11 +256,7 @@ void OnScreenUI::DrawImGui()
|
|||
// Create On-Screen-Messages
|
||||
void OnScreenUI::DrawDebugText()
|
||||
{
|
||||
const bool show_movie_window =
|
||||
Config::Get(Config::MAIN_SHOW_FRAME_COUNT) || Config::Get(Config::MAIN_SHOW_LAG) ||
|
||||
Config::Get(Config::MAIN_MOVIE_SHOW_INPUT_DISPLAY) ||
|
||||
Config::Get(Config::MAIN_MOVIE_SHOW_RTC) || Config::Get(Config::MAIN_MOVIE_SHOW_RERECORD);
|
||||
if (show_movie_window)
|
||||
if (Config::Get(Config::MAIN_MOVIE_SHOW_OSD))
|
||||
{
|
||||
// Position under the FPS display.
|
||||
ImGui::SetNextWindowPos(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue