mirror of
https://github.com/PCSX2/pcsx2.git
synced 2025-12-16 04:08:48 +00:00
Qt: Translation Fixes From Crowdin
Co-Authored-By: TellowKrinkle <3315070+TellowKrinkle@users.noreply.github.com>
This commit is contained in:
parent
47fe2344a5
commit
7f233ca620
@ -272,7 +272,7 @@ if (NOT APPLE)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file(GLOB TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Translations/*.ts)
|
file(GLOB TS_FILES ${CMAKE_CURRENT_SOURCE_DIR}/Translations/pcsx2-qt_*-*.ts)
|
||||||
|
|
||||||
target_precompile_headers(pcsx2-qt PRIVATE PrecompiledHeader.h)
|
target_precompile_headers(pcsx2-qt PRIVATE PrecompiledHeader.h)
|
||||||
set_source_files_properties(PrecompiledHeader.cpp PROPERTIES HEADER_FILE_ONLY TRUE)
|
set_source_files_properties(PrecompiledHeader.cpp PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||||
|
|||||||
@ -1876,7 +1876,7 @@ void MainWindow::onInputRecPlayActionTriggered()
|
|||||||
|
|
||||||
QFileDialog dialog(this);
|
QFileDialog dialog(this);
|
||||||
dialog.setFileMode(QFileDialog::ExistingFile);
|
dialog.setFileMode(QFileDialog::ExistingFile);
|
||||||
dialog.setWindowTitle("Select a File");
|
dialog.setWindowTitle(tr("Select a File"));
|
||||||
dialog.setNameFilter(tr("Input Recording Files (*.p2m2)"));
|
dialog.setNameFilter(tr("Input Recording Files (*.p2m2)"));
|
||||||
QStringList fileNames;
|
QStringList fileNames;
|
||||||
if (dialog.exec())
|
if (dialog.exec())
|
||||||
@ -3058,7 +3058,7 @@ void MainWindow::populateLoadStateMenu(QMenu* menu, const QString& filename, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
const u32 deleted = VMManager::DeleteSaveStates(serial.toUtf8().constData(), crc, true);
|
const u32 deleted = VMManager::DeleteSaveStates(serial.toUtf8().constData(), crc, true);
|
||||||
QMessageBox::information(this, tr("Delete Save States"), tr("%1 save states deleted.").arg(deleted));
|
QMessageBox::information(this, tr("Delete Save States"), tr("%n save states deleted.", "", deleted));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="groupBox">
|
<widget class="QGroupBox" name="screenshotGroupBox">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Screenshot Capture Setup</string>
|
<string>Screenshot Capture Setup</string>
|
||||||
</property>
|
</property>
|
||||||
@ -42,7 +42,7 @@
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Window Resolution (Aspect Corrected)</string>
|
<string>Display Resolution (Aspect Corrected)</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@ -186,6 +186,9 @@
|
|||||||
<property name="singleStep">
|
<property name="singleStep">
|
||||||
<number>1</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>67</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0" colspan="2">
|
<item row="2" column="0" colspan="2">
|
||||||
@ -273,6 +276,9 @@
|
|||||||
<property name="singleStep">
|
<property name="singleStep">
|
||||||
<number>100</number>
|
<number>100</number>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>420</number>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
@ -325,7 +331,7 @@
|
|||||||
<number>16</number>
|
<number>16</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="value">
|
<property name="value">
|
||||||
<number>240</number>
|
<number>480</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@ -472,7 +472,7 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* settings_dialog,
|
|||||||
|
|
||||||
dialog()->registerWidgetHelp(m_display.interlacing, tr("Deinterlacing"), tr("Automatic (Default)"), tr("Determines the deinterlacing method to be used on the interlaced screen of the emulated console. Automatic should be able to correctly deinterlace most games, but if you see visibly shaky graphics, try one of the other options."));
|
dialog()->registerWidgetHelp(m_display.interlacing, tr("Deinterlacing"), tr("Automatic (Default)"), tr("Determines the deinterlacing method to be used on the interlaced screen of the emulated console. Automatic should be able to correctly deinterlace most games, but if you see visibly shaky graphics, try one of the other options."));
|
||||||
|
|
||||||
dialog()->registerWidgetHelp(m_capture.screenshotSize, tr("Screenshot Resolution"), tr("Screen Resolution"),
|
dialog()->registerWidgetHelp(m_capture.screenshotSize, tr("Screenshot Resolution"), tr("Display Resolution"),
|
||||||
tr("Determines the resolution at which screenshots will be saved. Internal resolutions preserve more detail at the cost of "
|
tr("Determines the resolution at which screenshots will be saved. Internal resolutions preserve more detail at the cost of "
|
||||||
"file size."));
|
"file size."));
|
||||||
|
|
||||||
@ -765,10 +765,10 @@ GraphicsSettingsWidget::GraphicsSettingsWidget(SettingsWindow* settings_dialog,
|
|||||||
tr("Shows the current controller state of the system in the bottom-left corner of the display."));
|
tr("Shows the current controller state of the system in the bottom-left corner of the display."));
|
||||||
|
|
||||||
dialog()->registerWidgetHelp(m_osd.showVideoCapture, tr("Show Video Capture Status"), tr("Checked"),
|
dialog()->registerWidgetHelp(m_osd.showVideoCapture, tr("Show Video Capture Status"), tr("Checked"),
|
||||||
tr("Shows the status of the currently active video capture in the top-right corner of the display.."));
|
tr("Shows the status of the currently active video capture in the top-right corner of the display."));
|
||||||
|
|
||||||
dialog()->registerWidgetHelp(m_osd.showInputRec, tr("Show Input Recording Status"), tr("Checked"),
|
dialog()->registerWidgetHelp(m_osd.showInputRec, tr("Show Input Recording Status"), tr("Checked"),
|
||||||
tr("Shows the status of the currently active input recording in the top-right corner of the display.."));
|
tr("Shows the status of the currently active input recording in the top-right corner of the display."));
|
||||||
|
|
||||||
dialog()->registerWidgetHelp(m_osd.showTextureReplacements, tr("Show Texture Replacement Status"), tr("Unchecked"),
|
dialog()->registerWidgetHelp(m_osd.showTextureReplacements, tr("Show Texture Replacement Status"), tr("Unchecked"),
|
||||||
tr("Shows the status of the number of dumped and loaded texture replacements in the top-right corner of the display."));
|
tr("Shows the status of the number of dumped and loaded texture replacements in the top-right corner of the display."));
|
||||||
|
|||||||
@ -93,7 +93,7 @@
|
|||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="nativeScalingLabel">
|
<widget class="QLabel" name="nativeScalingLabel">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Native Scaling</string>
|
<string>Native Scaling:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="buddy">
|
<property name="buddy">
|
||||||
<cstring>nativeScaling</cstring>
|
<cstring>nativeScaling</cstring>
|
||||||
|
|||||||
@ -261,8 +261,10 @@ void SetupWizardDialog::onDirectoryListContextMenuRequested(const QPoint& point)
|
|||||||
const int row = selection[0].row();
|
const int row = selection[0].row();
|
||||||
|
|
||||||
QMenu menu;
|
QMenu menu;
|
||||||
|
//: Part of the right-click menu for game directory entries
|
||||||
menu.addAction(tr("Remove"), [this]() { onRemoveSearchDirectoryButtonClicked(); });
|
menu.addAction(tr("Remove"), [this]() { onRemoveSearchDirectoryButtonClicked(); });
|
||||||
menu.addSeparator();
|
menu.addSeparator();
|
||||||
|
//: Part of the right-click menu for game directory entries
|
||||||
menu.addAction(tr("Open Directory..."),
|
menu.addAction(tr("Open Directory..."),
|
||||||
[this, row]() { QtUtils::OpenURL(this, QUrl::fromLocalFile(m_ui.searchDirectoryList->item(row, 0)->text())); });
|
[this, row]() { QtUtils::OpenURL(this, QUrl::fromLocalFile(m_ui.searchDirectoryList->item(row, 0)->text())); });
|
||||||
menu.exec(m_ui.searchDirectoryList->mapToGlobal(point));
|
menu.exec(m_ui.searchDirectoryList->mapToGlobal(point));
|
||||||
|
|||||||
@ -82,7 +82,7 @@ void InputRecordingViewer::openFile()
|
|||||||
{
|
{
|
||||||
QFileDialog dialog(this);
|
QFileDialog dialog(this);
|
||||||
dialog.setFileMode(QFileDialog::ExistingFile);
|
dialog.setFileMode(QFileDialog::ExistingFile);
|
||||||
dialog.setWindowTitle("Select a File");
|
dialog.setWindowTitle(tr("Select a File"));
|
||||||
dialog.setNameFilter(tr("Input Recording Files (*.p2m2)"));
|
dialog.setNameFilter(tr("Input Recording Files (*.p2m2)"));
|
||||||
QStringList fileNames;
|
QStringList fileNames;
|
||||||
if (dialog.exec())
|
if (dialog.exec())
|
||||||
|
|||||||
@ -589,18 +589,18 @@ Login token generated on %2.</source>
|
|||||||
<location filename="../../pcsx2/Achievements.cpp" line="1104"/>
|
<location filename="../../pcsx2/Achievements.cpp" line="1104"/>
|
||||||
<source>You have unlocked {} of %n achievements</source>
|
<source>You have unlocked {} of %n achievements</source>
|
||||||
<comment>Achievement popup</comment>
|
<comment>Achievement popup</comment>
|
||||||
<translation>
|
<translation type="unfinished">
|
||||||
<numerusform>You have unlocked {} of %n achievements</numerusform>
|
<numerusform></numerusform>
|
||||||
<numerusform>You have unlocked {} of %n achievements</numerusform>
|
<numerusform></numerusform>
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../../pcsx2/Achievements.cpp" line="1107"/>
|
<location filename="../../pcsx2/Achievements.cpp" line="1107"/>
|
||||||
<source>and earned {} of %n points</source>
|
<source>and earned {} of %n points</source>
|
||||||
<comment>Achievement popup</comment>
|
<comment>Achievement popup</comment>
|
||||||
<translation>
|
<translation type="unfinished">
|
||||||
<numerusform>and earned {} of %n points</numerusform>
|
<numerusform></numerusform>
|
||||||
<numerusform>and earned {} of %n points</numerusform>
|
<numerusform></numerusform>
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@ -622,18 +622,18 @@ Login token generated on %2.</source>
|
|||||||
<location filename="../../pcsx2/Achievements.cpp" line="1191"/>
|
<location filename="../../pcsx2/Achievements.cpp" line="1191"/>
|
||||||
<source>%n achievements</source>
|
<source>%n achievements</source>
|
||||||
<comment>Mastery popup</comment>
|
<comment>Mastery popup</comment>
|
||||||
<translation>
|
<translation type="unfinished">
|
||||||
<numerusform>%n achievement</numerusform>
|
<numerusform></numerusform>
|
||||||
<numerusform>%n achievements</numerusform>
|
<numerusform></numerusform>
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message numerus="yes">
|
<message numerus="yes">
|
||||||
<location filename="../../pcsx2/Achievements.cpp" line="1193"/>
|
<location filename="../../pcsx2/Achievements.cpp" line="1193"/>
|
||||||
<source>%n points</source>
|
<source>%n points</source>
|
||||||
<comment>Mastery popup</comment>
|
<comment>Mastery popup</comment>
|
||||||
<translation>
|
<translation type="unfinished">
|
||||||
<numerusform>%n point</numerusform>
|
<numerusform></numerusform>
|
||||||
<numerusform>%n points</numerusform>
|
<numerusform></numerusform>
|
||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
@ -9641,8 +9641,8 @@ Do you want to load this save and continue?</source>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../pcsx2/ImGui/FullscreenUI.cpp" line="9650"/>
|
<location filename="../../pcsx2/ImGui/FullscreenUI.cpp" line="9618"/>
|
||||||
<source>Please enter your user name and password for retroachievements.org below.
|
<source>Please enter your user name and password for retroachievements.org below.
|
||||||
|
|
||||||
Your password will not be saved in PCSX2, an access token will be generated and used instead.</source>
|
Your password will not be saved in PCSX2, an access token will be generated and used instead.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
@ -15059,7 +15059,7 @@ Scanning recursively takes more time, but will identify files in subdirectories.
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../Settings/GraphicsSettingsWidget.cpp" line="830"/>
|
<location filename="../Settings/GraphicsSettingsWidget.cpp" line="830"/>
|
||||||
<source>Use Blit Swap Chain</source>
|
<source>Use Blit Swap Chain</source>
|
||||||
<extracomment>Blit = a data operation. You might want to write it as-is, but fully uppercased. More information: https://en.wikipedia.org/wiki/Bit_blit
|
<extracomment>Blit = a data operation. You might want to write it as-is, but fully uppercased. More information: https://en.wikipedia.org/wiki/Bit_blit
|
||||||
Swap chain: see Microsoft's Terminology Portal.</extracomment>
|
Swap chain: see Microsoft's Terminology Portal.</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -21225,7 +21225,7 @@ Ejecting {3} and replacing it with {2}.</source>
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../Settings/HddCreateQt.cpp" line="17"/>
|
<location filename="../Settings/HddCreateQt.cpp" line="17"/>
|
||||||
<location filename="../Settings/HddCreateQt.cpp" line="26"/>
|
<location filename="../Settings/HddCreateQt.cpp" line="26"/>
|
||||||
<source>Creating HDD file
|
<source>Creating HDD file
|
||||||
%1 / %2 MiB</source>
|
%1 / %2 MiB</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
@ -25530,6 +25530,7 @@ PCSX2 will be able to run once you've placed your BIOS image inside the fol
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../pcsx2/VMManager.cpp" line="3204"/>
|
<location filename="../../pcsx2/VMManager.cpp" line="3204"/>
|
||||||
|
|
||||||
<source>Texture dumping is enabled, this will continually dump textures to disk.</source>
|
<source>Texture dumping is enabled, this will continually dump textures to disk.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|||||||
@ -513,7 +513,7 @@ bool GSDevice11::Create(GSVSyncMode vsync_mode, bool allow_present_throttle)
|
|||||||
if (m_feature_level < D3D_FEATURE_LEVEL_11_0)
|
if (m_feature_level < D3D_FEATURE_LEVEL_11_0)
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("d3d11_feature_level_warning", ICON_FA_TRIANGLE_EXCLAMATION,
|
Host::AddIconOSDMessage("d3d11_feature_level_warning", ICON_FA_TRIANGLE_EXCLAMATION,
|
||||||
TRANSLATE_SV("GS", "The Direct3D11 renderer is running at feature level 10.0. This is an UNSUPPORTED configuration.\n"
|
TRANSLATE_SV("GS", "The Direct3D 11 renderer is running at feature level 10.0. This is an UNSUPPORTED configuration.\n"
|
||||||
"Do not request support, please upgrade your hardware/drivers first."),
|
"Do not request support, please upgrade your hardware/drivers first."),
|
||||||
Host::OSD_WARNING_DURATION);
|
Host::OSD_WARNING_DURATION);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1202,11 +1202,11 @@ void FullscreenUI::Shutdown(bool clear_state)
|
|||||||
s_about_window_open = false;
|
s_about_window_open = false;
|
||||||
}
|
}
|
||||||
s_hotkey_list_cache = {};
|
s_hotkey_list_cache = {};
|
||||||
|
|
||||||
s_custom_background_texture.reset();
|
s_custom_background_texture.reset();
|
||||||
s_custom_background_path.clear();
|
s_custom_background_path.clear();
|
||||||
s_custom_background_enabled = false;
|
s_custom_background_enabled = false;
|
||||||
|
|
||||||
DestroyResources();
|
DestroyResources();
|
||||||
ImGuiFullscreen::Shutdown(clear_state);
|
ImGuiFullscreen::Shutdown(clear_state);
|
||||||
s_initialized = false;
|
s_initialized = false;
|
||||||
@ -1240,7 +1240,7 @@ void FullscreenUI::Render()
|
|||||||
s_current_main_window == MainWindowType::GameList ||
|
s_current_main_window == MainWindowType::GameList ||
|
||||||
s_current_main_window == MainWindowType::GameListSettings ||
|
s_current_main_window == MainWindowType::GameListSettings ||
|
||||||
s_current_main_window == MainWindowType::Settings) && s_custom_background_enabled && s_custom_background_texture;
|
s_current_main_window == MainWindowType::Settings) && s_custom_background_enabled && s_custom_background_texture;
|
||||||
|
|
||||||
ImVec4 original_background_color;
|
ImVec4 original_background_color;
|
||||||
if (should_draw_background)
|
if (should_draw_background)
|
||||||
{
|
{
|
||||||
@ -1691,7 +1691,7 @@ bool FullscreenUI::ShouldDefaultToGameList()
|
|||||||
void FullscreenUI::LoadCustomBackground()
|
void FullscreenUI::LoadCustomBackground()
|
||||||
{
|
{
|
||||||
std::string path = Host::GetBaseStringSettingValue("UI", "GameListBackgroundPath");
|
std::string path = Host::GetBaseStringSettingValue("UI", "GameListBackgroundPath");
|
||||||
|
|
||||||
if (path.empty())
|
if (path.empty())
|
||||||
{
|
{
|
||||||
s_custom_background_texture.reset();
|
s_custom_background_texture.reset();
|
||||||
@ -1757,15 +1757,15 @@ void FullscreenUI::DrawCustomBackground()
|
|||||||
|
|
||||||
const ImGuiIO& io = ImGui::GetIO();
|
const ImGuiIO& io = ImGui::GetIO();
|
||||||
const ImVec2 display_size = io.DisplaySize;
|
const ImVec2 display_size = io.DisplaySize;
|
||||||
|
|
||||||
const float opacity = Host::GetBaseFloatSettingValue("UI", "GameListBackgroundOpacity", 100.0f) / 100.0f;
|
const float opacity = Host::GetBaseFloatSettingValue("UI", "GameListBackgroundOpacity", 100.0f) / 100.0f;
|
||||||
const std::string mode = Host::GetBaseStringSettingValue("UI", "GameListBackgroundMode", "fit");
|
const std::string mode = Host::GetBaseStringSettingValue("UI", "GameListBackgroundMode", "fit");
|
||||||
|
|
||||||
const float tex_width = static_cast<float>(s_custom_background_texture->GetWidth());
|
const float tex_width = static_cast<float>(s_custom_background_texture->GetWidth());
|
||||||
const float tex_height = static_cast<float>(s_custom_background_texture->GetHeight());
|
const float tex_height = static_cast<float>(s_custom_background_texture->GetHeight());
|
||||||
|
|
||||||
ImVec2 img_min, img_max;
|
ImVec2 img_min, img_max;
|
||||||
|
|
||||||
if (mode == "stretch")
|
if (mode == "stretch")
|
||||||
{
|
{
|
||||||
// stretch to fill entire display (ignores aspect ratio)
|
// stretch to fill entire display (ignores aspect ratio)
|
||||||
@ -1777,7 +1777,7 @@ void FullscreenUI::DrawCustomBackground()
|
|||||||
// Fill display while preserving aspect ratio (could crop edges)
|
// Fill display while preserving aspect ratio (could crop edges)
|
||||||
const float display_aspect = display_size.x / display_size.y;
|
const float display_aspect = display_size.x / display_size.y;
|
||||||
const float tex_aspect = tex_width / tex_height;
|
const float tex_aspect = tex_width / tex_height;
|
||||||
|
|
||||||
float scale;
|
float scale;
|
||||||
if (tex_aspect > display_aspect)
|
if (tex_aspect > display_aspect)
|
||||||
{
|
{
|
||||||
@ -1789,12 +1789,12 @@ void FullscreenUI::DrawCustomBackground()
|
|||||||
// Image is taller scale to width and crop top/bottom
|
// Image is taller scale to width and crop top/bottom
|
||||||
scale = display_size.x / tex_width;
|
scale = display_size.x / tex_width;
|
||||||
}
|
}
|
||||||
|
|
||||||
const float scaled_width = tex_width * scale;
|
const float scaled_width = tex_width * scale;
|
||||||
const float scaled_height = tex_height * scale;
|
const float scaled_height = tex_height * scale;
|
||||||
const float offset_x = (display_size.x - scaled_width) * 0.5f;
|
const float offset_x = (display_size.x - scaled_width) * 0.5f;
|
||||||
const float offset_y = (display_size.y - scaled_height) * 0.5f;
|
const float offset_y = (display_size.y - scaled_height) * 0.5f;
|
||||||
|
|
||||||
img_min = ImVec2(offset_x, offset_y);
|
img_min = ImVec2(offset_x, offset_y);
|
||||||
img_max = ImVec2(offset_x + scaled_width, offset_y + scaled_height);
|
img_max = ImVec2(offset_x + scaled_width, offset_y + scaled_height);
|
||||||
}
|
}
|
||||||
@ -1803,7 +1803,7 @@ void FullscreenUI::DrawCustomBackground()
|
|||||||
// Fit on screen while preserving aspect ratio (no cropping)
|
// Fit on screen while preserving aspect ratio (no cropping)
|
||||||
const float display_aspect = display_size.x / display_size.y;
|
const float display_aspect = display_size.x / display_size.y;
|
||||||
const float tex_aspect = tex_width / tex_height;
|
const float tex_aspect = tex_width / tex_height;
|
||||||
|
|
||||||
float scale;
|
float scale;
|
||||||
if (tex_aspect > display_aspect)
|
if (tex_aspect > display_aspect)
|
||||||
{
|
{
|
||||||
@ -1815,12 +1815,12 @@ void FullscreenUI::DrawCustomBackground()
|
|||||||
// Image is taller than display
|
// Image is taller than display
|
||||||
scale = display_size.y / tex_height;
|
scale = display_size.y / tex_height;
|
||||||
}
|
}
|
||||||
|
|
||||||
const float scaled_width = tex_width * scale;
|
const float scaled_width = tex_width * scale;
|
||||||
const float scaled_height = tex_height * scale;
|
const float scaled_height = tex_height * scale;
|
||||||
const float offset_x = (display_size.x - scaled_width) * 0.5f;
|
const float offset_x = (display_size.x - scaled_width) * 0.5f;
|
||||||
const float offset_y = (display_size.y - scaled_height) * 0.5f;
|
const float offset_y = (display_size.y - scaled_height) * 0.5f;
|
||||||
|
|
||||||
img_min = ImVec2(offset_x, offset_y);
|
img_min = ImVec2(offset_x, offset_y);
|
||||||
img_max = ImVec2(offset_x + scaled_width, offset_y + scaled_height);
|
img_max = ImVec2(offset_x + scaled_width, offset_y + scaled_height);
|
||||||
}
|
}
|
||||||
@ -1829,7 +1829,7 @@ void FullscreenUI::DrawCustomBackground()
|
|||||||
// We need to make windows transparent so our background image shows through
|
// We need to make windows transparent so our background image shows through
|
||||||
const ImVec4 transparent_bg = ImVec4(UIBackgroundColor.x, UIBackgroundColor.y, UIBackgroundColor.z, 0.0f);
|
const ImVec4 transparent_bg = ImVec4(UIBackgroundColor.x, UIBackgroundColor.y, UIBackgroundColor.z, 0.0f);
|
||||||
ImGuiFullscreen::UIBackgroundColor = transparent_bg;
|
ImGuiFullscreen::UIBackgroundColor = transparent_bg;
|
||||||
|
|
||||||
ImDrawList* bg_draw_list = ImGui::GetBackgroundDrawList();
|
ImDrawList* bg_draw_list = ImGui::GetBackgroundDrawList();
|
||||||
const ImU32 col = IM_COL32(255, 255, 255, static_cast<u8>(opacity * 255.0f));
|
const ImU32 col = IM_COL32(255, 255, 255, static_cast<u8>(opacity * 255.0f));
|
||||||
bg_draw_list->AddImage(reinterpret_cast<ImTextureID>(s_custom_background_texture->GetNativeHandle()),
|
bg_draw_list->AddImage(reinterpret_cast<ImTextureID>(s_custom_background_texture->GetNativeHandle()),
|
||||||
@ -3358,7 +3358,7 @@ void FullscreenUI::DrawIPAddressSetting(SettingsInterface* bsi, const char* titl
|
|||||||
|
|
||||||
char ip_str[16];
|
char ip_str[16];
|
||||||
std::snprintf(ip_str, sizeof(ip_str), "%d.%d.%d.%d", ip_octets[0], ip_octets[1], ip_octets[2], ip_octets[3]);
|
std::snprintf(ip_str, sizeof(ip_str), "%d.%d.%d.%d", ip_octets[0], ip_octets[1], ip_octets[2], ip_octets[3]);
|
||||||
|
|
||||||
const char* message;
|
const char* message;
|
||||||
switch (ip_type)
|
switch (ip_type)
|
||||||
{
|
{
|
||||||
@ -3382,9 +3382,9 @@ void FullscreenUI::DrawIPAddressSetting(SettingsInterface* bsi, const char* titl
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImGuiFullscreen::CloseInputDialog();
|
ImGuiFullscreen::CloseInputDialog();
|
||||||
|
|
||||||
std::string ip_str_value(ip_str);
|
std::string ip_str_value(ip_str);
|
||||||
|
|
||||||
ImGuiFullscreen::OpenInputStringDialog(
|
ImGuiFullscreen::OpenInputStringDialog(
|
||||||
title,
|
title,
|
||||||
message,
|
message,
|
||||||
@ -3401,10 +3401,10 @@ void FullscreenUI::DrawIPAddressSetting(SettingsInterface* bsi, const char* titl
|
|||||||
new_octets[i] = std::clamp(std::atoi(segment.c_str()), 0, 255);
|
new_octets[i] = std::clamp(std::atoi(segment.c_str()), 0, 255);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
char ip_str[16];
|
char ip_str[16];
|
||||||
std::snprintf(ip_str, sizeof(ip_str), "%d.%d.%d.%d", new_octets[0], new_octets[1], new_octets[2], new_octets[3]);
|
std::snprintf(ip_str, sizeof(ip_str), "%d.%d.%d.%d", new_octets[0], new_octets[1], new_octets[2], new_octets[3]);
|
||||||
|
|
||||||
if (IsEditingGameSettings(bsi) && strcmp(ip_str, default_value) == 0)
|
if (IsEditingGameSettings(bsi) && strcmp(ip_str, default_value) == 0)
|
||||||
bsi->DeleteValue(section, key);
|
bsi->DeleteValue(section, key);
|
||||||
else
|
else
|
||||||
@ -4051,16 +4051,16 @@ void FullscreenUI::DrawInterfaceSettingsPage()
|
|||||||
"EmuCore", "UseSavestateSelector", true);
|
"EmuCore", "UseSavestateSelector", true);
|
||||||
|
|
||||||
MenuHeading(FSUI_CSTR("Background"));
|
MenuHeading(FSUI_CSTR("Background"));
|
||||||
|
|
||||||
std::string background_path = bsi->GetStringValue("UI", "GameListBackgroundPath", "");
|
std::string background_path = bsi->GetStringValue("UI", "GameListBackgroundPath", "");
|
||||||
const bool background_enabled = bsi->GetBoolValue("UI", "GameListBackgroundEnabled", false);
|
const bool background_enabled = bsi->GetBoolValue("UI", "GameListBackgroundEnabled", false);
|
||||||
|
|
||||||
std::string background_display = FSUI_STR("None");
|
std::string background_display = FSUI_STR("None");
|
||||||
if (!background_path.empty() && background_enabled)
|
if (!background_path.empty() && background_enabled)
|
||||||
{
|
{
|
||||||
background_display = Path::GetFileName(background_path);
|
background_display = Path::GetFileName(background_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MenuButtonWithValue(FSUI_ICONSTR(ICON_FA_IMAGE, "Background Image"),
|
if (MenuButtonWithValue(FSUI_ICONSTR(ICON_FA_IMAGE, "Background Image"),
|
||||||
FSUI_CSTR("Select a custom background image to use in Big Picture Mode menus."),
|
FSUI_CSTR("Select a custom background image to use in Big Picture Mode menus."),
|
||||||
background_display.c_str()))
|
background_display.c_str()))
|
||||||
@ -4078,30 +4078,30 @@ void FullscreenUI::DrawInterfaceSettingsPage()
|
|||||||
bsi->SetBoolValue("UI", "GameListBackgroundEnabled", true);
|
bsi->SetBoolValue("UI", "GameListBackgroundEnabled", true);
|
||||||
SetSettingsChanged(bsi);
|
SetSettingsChanged(bsi);
|
||||||
}
|
}
|
||||||
|
|
||||||
LoadCustomBackground();
|
LoadCustomBackground();
|
||||||
}
|
}
|
||||||
CloseFileSelector();
|
CloseFileSelector();
|
||||||
},
|
},
|
||||||
GetImageFileFilters());
|
GetImageFileFilters());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MenuButton(FSUI_ICONSTR(ICON_FA_XMARK, "Clear Background Image"),
|
if (MenuButton(FSUI_ICONSTR(ICON_FA_XMARK, "Clear Background Image"),
|
||||||
FSUI_CSTR("Removes the custom background image.")))
|
FSUI_CSTR("Removes the custom background image.")))
|
||||||
{
|
{
|
||||||
bsi->DeleteValue("UI", "GameListBackgroundPath");
|
bsi->DeleteValue("UI", "GameListBackgroundPath");
|
||||||
bsi->SetBoolValue("UI", "GameListBackgroundEnabled", false);
|
bsi->SetBoolValue("UI", "GameListBackgroundEnabled", false);
|
||||||
SetSettingsChanged(bsi);
|
SetSettingsChanged(bsi);
|
||||||
|
|
||||||
s_custom_background_texture.reset();
|
s_custom_background_texture.reset();
|
||||||
s_custom_background_path.clear();
|
s_custom_background_path.clear();
|
||||||
s_custom_background_enabled = false;
|
s_custom_background_enabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawIntRangeSetting(bsi, FSUI_ICONSTR(ICON_FA_DROPLET, "Background Opacity"),
|
DrawIntRangeSetting(bsi, FSUI_ICONSTR(ICON_FA_DROPLET, "Background Opacity"),
|
||||||
FSUI_CSTR("Sets the transparency of the custom background image."),
|
FSUI_CSTR("Sets the transparency of the custom background image."),
|
||||||
"UI", "GameListBackgroundOpacity", 100, 0, 100, "%d%%");
|
"UI", "GameListBackgroundOpacity", 100, 0, 100, "%d%%");
|
||||||
|
|
||||||
static constexpr const char* s_background_mode_names[] = {
|
static constexpr const char* s_background_mode_names[] = {
|
||||||
FSUI_NSTR("Fit"),
|
FSUI_NSTR("Fit"),
|
||||||
FSUI_NSTR("Fill"),
|
FSUI_NSTR("Fill"),
|
||||||
@ -4723,9 +4723,9 @@ void FullscreenUI::DrawGraphicsSettingsPage(SettingsInterface* bsi, bool show_ad
|
|||||||
FSUI_NSTR("Disabled (Ignore Transfers)"),
|
FSUI_NSTR("Disabled (Ignore Transfers)"),
|
||||||
};
|
};
|
||||||
static constexpr const char* s_screenshot_sizes[] = {
|
static constexpr const char* s_screenshot_sizes[] = {
|
||||||
FSUI_NSTR("Screen Resolution"),
|
FSUI_NSTR("Display Resolution (Aspect Corrected)"),
|
||||||
FSUI_NSTR("Internal Resolution"),
|
FSUI_NSTR("Internal Resolution (Aspect Corrected)"),
|
||||||
FSUI_NSTR("Internal Resolution (Aspect Uncorrected)"),
|
FSUI_NSTR("Internal Resolution (No Aspect Correction)"),
|
||||||
};
|
};
|
||||||
static constexpr const char* s_screenshot_formats[] = {
|
static constexpr const char* s_screenshot_formats[] = {
|
||||||
FSUI_NSTR("PNG"),
|
FSUI_NSTR("PNG"),
|
||||||
@ -5300,22 +5300,22 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
const bool network_enabled = GetEffectiveBoolSetting(bsi, "DEV9/Eth", "EthEnable", false);
|
const bool network_enabled = GetEffectiveBoolSetting(bsi, "DEV9/Eth", "EthEnable", false);
|
||||||
|
|
||||||
const std::string current_api = bsi->GetStringValue("DEV9/Eth", "EthApi", "Unset");
|
const std::string current_api = bsi->GetStringValue("DEV9/Eth", "EthApi", "Unset");
|
||||||
|
|
||||||
static std::vector<std::vector<AdapterEntry>> adapter_lists;
|
static std::vector<std::vector<AdapterEntry>> adapter_lists;
|
||||||
static std::vector<Pcsx2Config::DEV9Options::NetApi> api_types;
|
static std::vector<Pcsx2Config::DEV9Options::NetApi> api_types;
|
||||||
static std::vector<std::string> api_display_names;
|
static std::vector<std::string> api_display_names;
|
||||||
static bool adapters_loaded = false;
|
static bool adapters_loaded = false;
|
||||||
|
|
||||||
if (!adapters_loaded && network_enabled)
|
if (!adapters_loaded && network_enabled)
|
||||||
{
|
{
|
||||||
adapter_lists.clear();
|
adapter_lists.clear();
|
||||||
api_types.clear();
|
api_types.clear();
|
||||||
api_display_names.clear();
|
api_display_names.clear();
|
||||||
|
|
||||||
adapter_lists.emplace_back();
|
adapter_lists.emplace_back();
|
||||||
api_types.emplace_back(Pcsx2Config::DEV9Options::NetApi::Unset);
|
api_types.emplace_back(Pcsx2Config::DEV9Options::NetApi::Unset);
|
||||||
api_display_names.emplace_back("Unset");
|
api_display_names.emplace_back("Unset");
|
||||||
|
|
||||||
std::vector<AdapterEntry> pcap_adapters = PCAPAdapter::GetAdapters();
|
std::vector<AdapterEntry> pcap_adapters = PCAPAdapter::GetAdapters();
|
||||||
if (!pcap_adapters.empty())
|
if (!pcap_adapters.empty())
|
||||||
{
|
{
|
||||||
@ -5323,7 +5323,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
std::vector<AdapterEntry> pcap_switched_adapters;
|
std::vector<AdapterEntry> pcap_switched_adapters;
|
||||||
std::set<std::string> seen_bridged_guids;
|
std::set<std::string> seen_bridged_guids;
|
||||||
std::set<std::string> seen_switched_guids;
|
std::set<std::string> seen_switched_guids;
|
||||||
|
|
||||||
for (const auto& adapter : pcap_adapters)
|
for (const auto& adapter : pcap_adapters)
|
||||||
{
|
{
|
||||||
if (adapter.type == Pcsx2Config::DEV9Options::NetApi::PCAP_Bridged)
|
if (adapter.type == Pcsx2Config::DEV9Options::NetApi::PCAP_Bridged)
|
||||||
@ -5343,7 +5343,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sort adapters alphabetically by name
|
// Sort adapters alphabetically by name
|
||||||
std::sort(pcap_bridged_adapters.begin(), pcap_bridged_adapters.end(),
|
std::sort(pcap_bridged_adapters.begin(), pcap_bridged_adapters.end(),
|
||||||
[](const AdapterEntry& a, const AdapterEntry& b) { return a.name < b.name; });
|
[](const AdapterEntry& a, const AdapterEntry& b) { return a.name < b.name; });
|
||||||
@ -5364,7 +5364,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
api_display_names.emplace_back("PCAP Switched");
|
api_display_names.emplace_back("PCAP Switched");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
std::vector<AdapterEntry> tap_adapters = TAPAdapter::GetAdapters();
|
std::vector<AdapterEntry> tap_adapters = TAPAdapter::GetAdapters();
|
||||||
if (!tap_adapters.empty())
|
if (!tap_adapters.empty())
|
||||||
@ -5378,7 +5378,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
api_display_names.emplace_back("TAP");
|
api_display_names.emplace_back("TAP");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::vector<AdapterEntry> socket_adapters = SocketAdapter::GetAdapters();
|
std::vector<AdapterEntry> socket_adapters = SocketAdapter::GetAdapters();
|
||||||
if (!socket_adapters.empty())
|
if (!socket_adapters.empty())
|
||||||
{
|
{
|
||||||
@ -5390,7 +5390,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
api_types.emplace_back(Pcsx2Config::DEV9Options::NetApi::Sockets);
|
api_types.emplace_back(Pcsx2Config::DEV9Options::NetApi::Sockets);
|
||||||
api_display_names.emplace_back("Sockets");
|
api_display_names.emplace_back("Sockets");
|
||||||
}
|
}
|
||||||
|
|
||||||
adapters_loaded = true;
|
adapters_loaded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5410,7 +5410,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
network_enabled))
|
network_enabled))
|
||||||
{
|
{
|
||||||
ImGuiFullscreen::ChoiceDialogOptions options;
|
ImGuiFullscreen::ChoiceDialogOptions options;
|
||||||
|
|
||||||
for (size_t i = 0; i < api_display_names.size(); i++)
|
for (size_t i = 0; i < api_display_names.size(); i++)
|
||||||
{
|
{
|
||||||
options.emplace_back(api_display_names[i], i == current_api_index);
|
options.emplace_back(api_display_names[i], i == current_api_index);
|
||||||
@ -5428,9 +5428,9 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
const std::string selected_api = Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(current_api_types[index])];
|
const std::string selected_api = Pcsx2Config::DEV9Options::NetApiNames[static_cast<int>(current_api_types[index])];
|
||||||
const std::string previous_api = bsi->GetStringValue("DEV9/Eth", "EthApi", "Unset");
|
const std::string previous_api = bsi->GetStringValue("DEV9/Eth", "EthApi", "Unset");
|
||||||
const std::string previous_device = bsi->GetStringValue("DEV9/Eth", "EthDevice", "");
|
const std::string previous_device = bsi->GetStringValue("DEV9/Eth", "EthDevice", "");
|
||||||
|
|
||||||
bsi->SetStringValue("DEV9/Eth", "EthApi", selected_api.c_str());
|
bsi->SetStringValue("DEV9/Eth", "EthApi", selected_api.c_str());
|
||||||
|
|
||||||
std::string new_device = "";
|
std::string new_device = "";
|
||||||
if (index < static_cast<s32>(current_adapter_lists.size()))
|
if (index < static_cast<s32>(current_adapter_lists.size()))
|
||||||
{
|
{
|
||||||
@ -5455,10 +5455,10 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
new_device = new_adapter_list[0].guid;
|
new_device = new_adapter_list[0].guid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bsi->SetStringValue("DEV9/Eth", "EthDevice", new_device.c_str());
|
bsi->SetStringValue("DEV9/Eth", "EthDevice", new_device.c_str());
|
||||||
SetSettingsChanged(bsi);
|
SetSettingsChanged(bsi);
|
||||||
|
|
||||||
CloseChoiceDialog();
|
CloseChoiceDialog();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -5481,7 +5481,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (device_display.empty())
|
if (device_display.empty())
|
||||||
device_display = current_device;
|
device_display = current_device;
|
||||||
}
|
}
|
||||||
@ -5528,7 +5528,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
if (index < static_cast<s32>(current_adapter_list.size()))
|
if (index < static_cast<s32>(current_adapter_list.size()))
|
||||||
{
|
{
|
||||||
const auto& selected_adapter = current_adapter_list[index];
|
const auto& selected_adapter = current_adapter_list[index];
|
||||||
|
|
||||||
auto lock = Host::GetSettingsLock();
|
auto lock = Host::GetSettingsLock();
|
||||||
bsi->SetStringValue("DEV9/Eth", "EthApi", current_api_choice.c_str());
|
bsi->SetStringValue("DEV9/Eth", "EthApi", current_api_choice.c_str());
|
||||||
bsi->SetStringValue("DEV9/Eth", "EthDevice", selected_adapter.guid.c_str());
|
bsi->SetStringValue("DEV9/Eth", "EthDevice", selected_adapter.guid.c_str());
|
||||||
@ -5574,7 +5574,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
FSUI_CSTR("Automatically determine the subnet mask based on the IP address class."),
|
FSUI_CSTR("Automatically determine the subnet mask based on the IP address class."),
|
||||||
"DEV9/Eth", "AutoMask", true, ip_settings_enabled && subnet_can_be_edited);
|
"DEV9/Eth", "AutoMask", true, ip_settings_enabled && subnet_can_be_edited);
|
||||||
DrawIPAddressSetting(bsi, FSUI_ICONSTR(ICON_FA_NETWORK_WIRED, "Subnet Mask"),
|
DrawIPAddressSetting(bsi, FSUI_ICONSTR(ICON_FA_NETWORK_WIRED, "Subnet Mask"),
|
||||||
FSUI_CSTR("Subnet mask for the PS2 virtual network adapter."), "DEV9/Eth", "Mask", "0.0.0.0",
|
FSUI_CSTR("Subnet mask for the PS2 virtual network adapter."), "DEV9/Eth", "Mask", "0.0.0.0",
|
||||||
ip_settings_enabled && subnet_can_be_edited && !mask_auto, LAYOUT_MENU_BUTTON_HEIGHT, g_large_font, g_medium_font, IPAddressType::SubnetMask);
|
ip_settings_enabled && subnet_can_be_edited && !mask_auto, LAYOUT_MENU_BUTTON_HEIGHT, g_large_font, g_medium_font, IPAddressType::SubnetMask);
|
||||||
|
|
||||||
const bool gateway_auto = GetEffectiveBoolSetting(bsi, "DEV9/Eth", "AutoGateway", true);
|
const bool gateway_auto = GetEffectiveBoolSetting(bsi, "DEV9/Eth", "AutoGateway", true);
|
||||||
@ -5632,7 +5632,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
{
|
{
|
||||||
const std::string full_path = fd.FileName;
|
const std::string full_path = fd.FileName;
|
||||||
const std::string filename = std::string(Path::GetFileName(full_path));
|
const std::string filename = std::string(Path::GetFileName(full_path));
|
||||||
|
|
||||||
// Get file size and determine LBA mode
|
// Get file size and determine LBA mode
|
||||||
const s64 file_size = FileSystem::GetPathFileSize(full_path.c_str());
|
const s64 file_size = FileSystem::GetPathFileSize(full_path.c_str());
|
||||||
if (file_size > 0)
|
if (file_size > 0)
|
||||||
@ -5640,8 +5640,8 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
const int size_gb = static_cast<int>(file_size / _1gb);
|
const int size_gb = static_cast<int>(file_size / _1gb);
|
||||||
const bool uses_lba48 = (file_size > static_cast<s64>(120) * _1gb);
|
const bool uses_lba48 = (file_size > static_cast<s64>(120) * _1gb);
|
||||||
const std::string lba_mode = uses_lba48 ? "LBA48" : "LBA28";
|
const std::string lba_mode = uses_lba48 ? "LBA48" : "LBA28";
|
||||||
|
|
||||||
choices.emplace_back(fmt::format("{} ({} GB, {})", filename, size_gb, lba_mode),
|
choices.emplace_back(fmt::format("{} ({} GB, {})", filename, size_gb, lba_mode),
|
||||||
hdd_selection == full_path);
|
hdd_selection == full_path);
|
||||||
values.emplace_back(full_path);
|
values.emplace_back(full_path);
|
||||||
}
|
}
|
||||||
@ -5661,7 +5661,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
if (values[index] == "__browse__")
|
if (values[index] == "__browse__")
|
||||||
{
|
{
|
||||||
CloseChoiceDialog();
|
CloseChoiceDialog();
|
||||||
|
|
||||||
OpenFileSelector(FSUI_ICONSTR(ICON_FA_HARD_DRIVE, "Select HDD Image File"), false,
|
OpenFileSelector(FSUI_ICONSTR(ICON_FA_HARD_DRIVE, "Select HDD Image File"), false,
|
||||||
[game_settings](const std::string& path) {
|
[game_settings](const std::string& path) {
|
||||||
if (path.empty())
|
if (path.empty())
|
||||||
@ -5677,7 +5677,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
else if (values[index] == "__create__")
|
else if (values[index] == "__create__")
|
||||||
{
|
{
|
||||||
CloseChoiceDialog();
|
CloseChoiceDialog();
|
||||||
|
|
||||||
std::vector<std::pair<std::string, int>> size_options = {
|
std::vector<std::pair<std::string, int>> size_options = {
|
||||||
{"40 GB (Recommended)", 40},
|
{"40 GB (Recommended)", 40},
|
||||||
{"80 GB", 80},
|
{"80 GB", 80},
|
||||||
@ -5702,7 +5702,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
if (size_values[size_index] == -1)
|
if (size_values[size_index] == -1)
|
||||||
{
|
{
|
||||||
CloseChoiceDialog();
|
CloseChoiceDialog();
|
||||||
|
|
||||||
OpenInputStringDialog(
|
OpenInputStringDialog(
|
||||||
FSUI_ICONSTR(ICON_FA_PEN_TO_SQUARE, "Custom HDD Size"),
|
FSUI_ICONSTR(ICON_FA_PEN_TO_SQUARE, "Custom HDD Size"),
|
||||||
FSUI_STR("Enter custom HDD size in gigabytes (40–2000):"),
|
FSUI_STR("Enter custom HDD size in gigabytes (40–2000):"),
|
||||||
@ -5711,7 +5711,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
[game_settings](std::string input) {
|
[game_settings](std::string input) {
|
||||||
if (input.empty())
|
if (input.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::optional<int> custom_size_opt = StringUtil::FromChars<int>(input);
|
std::optional<int> custom_size_opt = StringUtil::FromChars<int>(input);
|
||||||
if (!custom_size_opt.has_value())
|
if (!custom_size_opt.has_value())
|
||||||
{
|
{
|
||||||
@ -5719,17 +5719,17 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int custom_size_gb = custom_size_opt.value();
|
int custom_size_gb = custom_size_opt.value();
|
||||||
|
|
||||||
if (custom_size_gb < 40 || custom_size_gb > 2000)
|
if (custom_size_gb < 40 || custom_size_gb > 2000)
|
||||||
{
|
{
|
||||||
ShowToast(std::string(), FSUI_STR("HDD size must be between 40 GB and 2000 GB."));
|
ShowToast(std::string(), FSUI_STR("HDD size must be between 40 GB and 2000 GB."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool lba48 = (custom_size_gb > 120);
|
const bool lba48 = (custom_size_gb > 120);
|
||||||
const std::string filename = fmt::format("DEV9hdd_{}GB_{}.raw", custom_size_gb, lba48 ? "LBA48" : "LBA28");
|
const std::string filename = fmt::format("DEV9hdd_{}GB_{}.raw", custom_size_gb, lba48 ? "LBA48" : "LBA28");
|
||||||
const std::string filepath = Path::Combine(EmuFolders::DataRoot, filename);
|
const std::string filepath = Path::Combine(EmuFolders::DataRoot, filename);
|
||||||
|
|
||||||
if (FileSystem::FileExists(filepath.c_str()))
|
if (FileSystem::FileExists(filepath.c_str()))
|
||||||
{
|
{
|
||||||
OpenConfirmMessageDialog(
|
OpenConfirmMessageDialog(
|
||||||
@ -5762,10 +5762,10 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
|
|
||||||
const int size_gb = size_values[size_index];
|
const int size_gb = size_values[size_index];
|
||||||
const bool lba48 = (size_gb > 120);
|
const bool lba48 = (size_gb > 120);
|
||||||
|
|
||||||
const std::string filename = fmt::format("DEV9hdd_{}GB_{}.raw", size_gb, lba48 ? "LBA48" : "LBA28");
|
const std::string filename = fmt::format("DEV9hdd_{}GB_{}.raw", size_gb, lba48 ? "LBA48" : "LBA28");
|
||||||
const std::string filepath = Path::Combine(EmuFolders::DataRoot, filename);
|
const std::string filepath = Path::Combine(EmuFolders::DataRoot, filename);
|
||||||
|
|
||||||
if (FileSystem::FileExists(filepath.c_str()))
|
if (FileSystem::FileExists(filepath.c_str()))
|
||||||
{
|
{
|
||||||
OpenConfirmMessageDialog(
|
OpenConfirmMessageDialog(
|
||||||
@ -5790,7 +5790,7 @@ void FullscreenUI::DrawNetworkHDDSettingsPage()
|
|||||||
SetSettingsChanged(bsi);
|
SetSettingsChanged(bsi);
|
||||||
FullscreenUI::CreateHardDriveWithProgress(filepath, size_gb, lba48);
|
FullscreenUI::CreateHardDriveWithProgress(filepath, size_gb, lba48);
|
||||||
}
|
}
|
||||||
|
|
||||||
CloseChoiceDialog();
|
CloseChoiceDialog();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -7854,7 +7854,7 @@ void FullscreenUI::DrawGameListWindow()
|
|||||||
void FullscreenUI::DrawGameList(const ImVec2& heading_size)
|
void FullscreenUI::DrawGameList(const ImVec2& heading_size)
|
||||||
{
|
{
|
||||||
ImGui::PushStyleColor(ImGuiCol_WindowBg, UIBackgroundColor);
|
ImGui::PushStyleColor(ImGuiCol_WindowBg, UIBackgroundColor);
|
||||||
|
|
||||||
if (!BeginFullscreenColumns(nullptr, heading_size.y, true, true))
|
if (!BeginFullscreenColumns(nullptr, heading_size.y, true, true))
|
||||||
{
|
{
|
||||||
EndFullscreenColumns();
|
EndFullscreenColumns();
|
||||||
@ -8140,7 +8140,7 @@ void FullscreenUI::DrawGameGrid(const ImVec2& heading_size)
|
|||||||
|
|
||||||
const bool show_titles = Host::GetBaseBoolSettingValue("UI", "FullscreenUIShowGameGridTitles", true);
|
const bool show_titles = Host::GetBaseBoolSettingValue("UI", "FullscreenUIShowGameGridTitles", true);
|
||||||
|
|
||||||
if (show_titles)
|
if (show_titles)
|
||||||
{
|
{
|
||||||
const ImRect title_bb(ImVec2(bb.Min.x, bb.Min.y + image_height + title_spacing), bb.Max);
|
const ImRect title_bb(ImVec2(bb.Min.x, bb.Min.y + image_height + title_spacing), bb.Max);
|
||||||
const std::string_view title(std::string_view(entry->GetTitle(true)).substr(0, 31));
|
const std::string_view title(std::string_view(entry->GetTitle(true)).substr(0, 31));
|
||||||
|
|||||||
@ -765,9 +765,9 @@ std::optional<InputBindingKey> SDLInputSource::ParseKeyString(const std::string_
|
|||||||
{
|
{
|
||||||
shown_prompt = true;
|
shown_prompt = true;
|
||||||
Host::ReportInfoAsync(TRANSLATE("SDLInputSource", "SDL3 Migration"),
|
Host::ReportInfoAsync(TRANSLATE("SDLInputSource", "SDL3 Migration"),
|
||||||
TRANSLATE("SDLInputSource", "As part of our upgrade to SDL3, we've had to migrate your binds\n"
|
TRANSLATE("SDLInputSource", "As part of our upgrade to SDL3, we've had to migrate your binds.\n"
|
||||||
"Your controller did not match the Xbox layout and may need rebinding\n"
|
"Your controller did not match the Xbox layout and may need rebinding.\n"
|
||||||
"Please verify your controller settings and amend if required"));
|
"Please verify your controller settings and amend if required."));
|
||||||
|
|
||||||
// Also apply BPM setting for legacy binds
|
// Also apply BPM setting for legacy binds
|
||||||
// We assume this is a Nintendo controller, BPM will check if it is
|
// We assume this is a Nintendo controller, BPM will check if it is
|
||||||
|
|||||||
@ -93,7 +93,7 @@ bool InputRecording::play(const std::string& filename)
|
|||||||
if (!FileSystem::FileExists(savestatePath.c_str()))
|
if (!FileSystem::FileExists(savestatePath.c_str()))
|
||||||
{
|
{
|
||||||
InputRec::consoleLog(fmt::format("Could not locate savestate file at location - {}", savestatePath));
|
InputRec::consoleLog(fmt::format("Could not locate savestate file at location - {}", savestatePath));
|
||||||
InputRec::log(TRANSLATE_STR("InputRecording", "Savestate load failed for input recording"), Host::OSD_ERROR_DURATION);
|
InputRec::log(TRANSLATE_STR("InputRecording", "Failed to load state for input recording"), Host::OSD_ERROR_DURATION);
|
||||||
m_file.close();
|
m_file.close();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -103,7 +103,7 @@ bool InputRecording::play(const std::string& filename)
|
|||||||
const auto loaded = VMManager::LoadState(savestatePath.c_str());
|
const auto loaded = VMManager::LoadState(savestatePath.c_str());
|
||||||
if (!loaded)
|
if (!loaded)
|
||||||
{
|
{
|
||||||
InputRec::log(TRANSLATE_STR("InputRecording", "Load state failed for input recording, unsupported version?"), Host::OSD_ERROR_DURATION);
|
InputRec::log(TRANSLATE_STR("InputRecording", "Failed to load state for input recording, unsupported version?"), Host::OSD_ERROR_DURATION);
|
||||||
m_file.close();
|
m_file.close();
|
||||||
m_is_active = false;
|
m_is_active = false;
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -581,9 +581,10 @@ bool Pad::Freeze(StateWrapper& sw)
|
|||||||
|
|
||||||
const auto& [port, slot] = sioConvertPadToPortAndSlot(unifiedSlot);
|
const auto& [port, slot] = sioConvertPadToPortAndSlot(unifiedSlot);
|
||||||
Host::AddIconOSDMessage(fmt::format("UnfreezePad{}Changed", unifiedSlot), ICON_FA_GAMEPAD,
|
Host::AddIconOSDMessage(fmt::format("UnfreezePad{}Changed", unifiedSlot), ICON_FA_GAMEPAD,
|
||||||
|
//: {0} and {1} are the port and multitap slot, {2} and {3} are controller types (e.g. "DualShock 2", "Jogcon")
|
||||||
fmt::format(TRANSLATE_FS("Pad",
|
fmt::format(TRANSLATE_FS("Pad",
|
||||||
"Controller port {0}, slot {1} has a {2} connected, but the save state has a "
|
"Controller port {0}, slot {1} has a {2} connected, but the save state has a "
|
||||||
"{3}.\nEjecting {3} and replacing it with {2}."),
|
"{3}.\nEjecting {2} and replacing it with {3}."),
|
||||||
port, slot,
|
port, slot,
|
||||||
GetControllerTypeName(currentPad ? currentPad->GetType() : Pad::ControllerType::NotConnected),
|
GetControllerTypeName(currentPad ? currentPad->GetType() : Pad::ControllerType::NotConnected),
|
||||||
GetControllerTypeName(statePadType)));
|
GetControllerTypeName(statePadType)));
|
||||||
@ -698,7 +699,7 @@ void Pad::SetMacroButtonState(InputBindingKey& key, u32 pad, u32 index, bool sta
|
|||||||
}
|
}
|
||||||
if (mb.active_buttons.find(key.bits) != mb.active_buttons.end())
|
if (mb.active_buttons.find(key.bits) != mb.active_buttons.end())
|
||||||
mb.active_buttons.erase(key.bits);
|
mb.active_buttons.erase(key.bits);
|
||||||
|
|
||||||
mb.active_buttons.emplace(key.bits, state);
|
mb.active_buttons.emplace(key.bits, state);
|
||||||
|
|
||||||
if (mb.active_buttons.size() != binding_count)
|
if (mb.active_buttons.size() != binding_count)
|
||||||
@ -759,4 +760,4 @@ void Pad::UpdateMacroButtons()
|
|||||||
ApplyMacroButton(pad, mb);
|
ApplyMacroButton(pad, mb);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1243,7 +1243,7 @@ namespace usb_msd
|
|||||||
{
|
{
|
||||||
static constexpr const SettingInfo settings[] = {
|
static constexpr const SettingInfo settings[] = {
|
||||||
{SettingInfo::Type::Path, "ImagePathMsd", TRANSLATE_NOOP("USB", "Image Path"),
|
{SettingInfo::Type::Path, "ImagePathMsd", TRANSLATE_NOOP("USB", "Image Path"),
|
||||||
TRANSLATE_NOOP("USB", "Sets the path to image which will back the virtual mass storage device.")},
|
TRANSLATE_NOOP("USB", "Sets the path to the disk image which will back the virtual mass storage device.")},
|
||||||
};
|
};
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
@ -1251,7 +1251,7 @@ namespace usb_msd
|
|||||||
{
|
{
|
||||||
static constexpr const SettingInfo settings[] = {
|
static constexpr const SettingInfo settings[] = {
|
||||||
{SettingInfo::Type::Path, "ImagePathMsac", TRANSLATE_NOOP("USB", "Image Path"),
|
{SettingInfo::Type::Path, "ImagePathMsac", TRANSLATE_NOOP("USB", "Image Path"),
|
||||||
TRANSLATE_NOOP("USB", "Sets the path to image which will back the virtual mass storage device.")},
|
TRANSLATE_NOOP("USB", "Sets the path to the disk image which will back the virtual mass storage device.")},
|
||||||
};
|
};
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user