mirror of https://github.com/PCSX2/pcsx2.git
Misc: Mark core strings for translation
This commit is contained in:
parent
f7bc05c735
commit
c06bc16b22
|
@ -1053,23 +1053,23 @@ void Achievements::DisplayAchievementSummary()
|
||||||
{
|
{
|
||||||
std::string title = s_game_title;
|
std::string title = s_game_title;
|
||||||
if (ChallengeModeActive())
|
if (ChallengeModeActive())
|
||||||
title += " (Hardcore Mode)";
|
title += TRANSLATE_SV("Achievements", " (Hardcore Mode)");
|
||||||
|
|
||||||
std::string summary;
|
std::string summary;
|
||||||
if (GetAchievementCount() > 0)
|
if (GetAchievementCount() > 0)
|
||||||
{
|
{
|
||||||
summary = StringUtil::StdStringFromFormat("You have earned %u of %u achievements, and %u of %u points.",
|
summary = fmt::format(TRANSLATE_SV("Achievements", "You have earned {0} of {1} achievements, and {2} of {3} points."),
|
||||||
GetUnlockedAchiementCount(), GetAchievementCount(), GetCurrentPointsForGame(), GetMaximumPointsForGame());
|
GetUnlockedAchiementCount(), GetAchievementCount(), GetCurrentPointsForGame(), GetMaximumPointsForGame());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
summary = "This game has no achievements.";
|
summary = TRANSLATE_SV("Achievements", "This game has no achievements.");
|
||||||
}
|
}
|
||||||
if (GetLeaderboardCount() > 0)
|
if (GetLeaderboardCount() > 0)
|
||||||
{
|
{
|
||||||
summary.push_back('\n');
|
summary.push_back('\n');
|
||||||
if (LeaderboardsActive())
|
if (LeaderboardsActive())
|
||||||
summary.append("Leaderboard submission is enabled.");
|
summary.append(TRANSLATE_SV("Achievements", "Leaderboard submission is enabled."));
|
||||||
}
|
}
|
||||||
|
|
||||||
GetMTGS().RunOnGSThread([title = std::move(title), summary = std::move(summary), icon = s_game_icon]() {
|
GetMTGS().RunOnGSThread([title = std::move(title), summary = std::move(summary), icon = s_game_icon]() {
|
||||||
|
@ -1505,7 +1505,8 @@ void Achievements::GameChanged(u32 disc_crc, u32 crc)
|
||||||
// when we're booting the bios, or shutting down, this will fail
|
// when we're booting the bios, or shutting down, this will fail
|
||||||
if (disc_crc != 0)
|
if (disc_crc != 0)
|
||||||
{
|
{
|
||||||
Host::AddKeyedOSDMessage("retroachievements_disc_read_failed", "Failed to read executable from disc. Achievements disabled.",
|
Host::AddKeyedOSDMessage("retroachievements_disc_read_failed",
|
||||||
|
TRANSLATE_STR("Achievements", "Failed to read executable from disc. Achievements disabled."),
|
||||||
Host::OSD_CRITICAL_ERROR_DURATION);
|
Host::OSD_CRITICAL_ERROR_DURATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -314,7 +314,10 @@ void CDVDsys_SetFile(CDVD_SourceType srctype, std::string newfile)
|
||||||
const auto driveType = GetDriveType(StringUtil::UTF8StringToWideString(root).c_str());
|
const auto driveType = GetDriveType(StringUtil::UTF8StringToWideString(root).c_str());
|
||||||
if (driveType == DRIVE_REMOVABLE)
|
if (driveType == DRIVE_REMOVABLE)
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("RemovableDriveWarning", ICON_FA_EXCLAMATION_TRIANGLE, "Game disc location is on a removable drive, performance issues such as jittering and freezing may occur.", Host::OSD_WARNING_DURATION);
|
Host::AddIconOSDMessage("RemovableDriveWarning", ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
|
TRANSLATE_SV("CDVD", "Game disc location is on a removable drive, performance issues such as jittering "
|
||||||
|
"and freezing may occur."),
|
||||||
|
Host::OSD_WARNING_DURATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -421,7 +424,8 @@ bool DoCDVDopen()
|
||||||
cdvdTD td;
|
cdvdTD td;
|
||||||
CDVD->getTD(0, &td);
|
CDVD->getTD(0, &td);
|
||||||
|
|
||||||
Host::AddKeyedOSDMessage("BlockDumpCreate", fmt::format("Saving CDVD block dump to '{}'.", temp), Host::OSD_INFO_DURATION);
|
Host::AddKeyedOSDMessage("BlockDumpCreate",
|
||||||
|
fmt::format(TRANSLATE_SV("CDVD", "Saving CDVD block dump to '{}'."), temp), Host::OSD_INFO_DURATION);
|
||||||
|
|
||||||
if (blockDumpFile.Create(std::move(temp), 2))
|
if (blockDumpFile.Create(std::move(temp), 2))
|
||||||
{
|
{
|
||||||
|
|
292
pcsx2/GS/GS.cpp
292
pcsx2/GS/GS.cpp
|
@ -265,8 +265,9 @@ bool GSreopen(bool recreate_device, bool recreate_renderer, const Pcsx2Config::G
|
||||||
if (!OpenGSDevice(GSConfig.Renderer, false, recreate_window) ||
|
if (!OpenGSDevice(GSConfig.Renderer, false, recreate_window) ||
|
||||||
(recreate_renderer && !OpenGSRenderer(GSConfig.Renderer, basemem)))
|
(recreate_renderer && !OpenGSRenderer(GSConfig.Renderer, basemem)))
|
||||||
{
|
{
|
||||||
Host::AddKeyedOSDMessage(
|
Host::AddKeyedOSDMessage("GSReopenFailed",
|
||||||
"GSReopenFailed", "Failed to reopen, restoring old configuration.", Host::OSD_CRITICAL_ERROR_DURATION);
|
TRANSLATE_STR("GS", "Failed to reopen, restoring old configuration."),
|
||||||
|
Host::OSD_CRITICAL_ERROR_DURATION);
|
||||||
|
|
||||||
CloseGSDevice(false);
|
CloseGSDevice(false);
|
||||||
|
|
||||||
|
@ -965,7 +966,8 @@ void GSFreeWrappedMemory(void* ptr, size_t size, size_t repeat)
|
||||||
static void HotkeyAdjustUpscaleMultiplier(s32 delta)
|
static void HotkeyAdjustUpscaleMultiplier(s32 delta)
|
||||||
{
|
{
|
||||||
const u32 new_multiplier = static_cast<u32>(std::clamp(static_cast<s32>(EmuConfig.GS.UpscaleMultiplier) + delta, 1, 8));
|
const u32 new_multiplier = static_cast<u32>(std::clamp(static_cast<s32>(EmuConfig.GS.UpscaleMultiplier) + delta, 1, 8));
|
||||||
Host::AddKeyedFormattedOSDMessage("UpscaleMultiplierChanged", Host::OSD_QUICK_DURATION, "Upscale multiplier set to %ux.", new_multiplier);
|
Host::AddKeyedOSDMessage("UpscaleMultiplierChanged",
|
||||||
|
fmt::format(TRANSLATE_SV("GS", "Upscale multiplier set to {}x."), new_multiplier), Host::OSD_QUICK_DURATION);
|
||||||
EmuConfig.GS.UpscaleMultiplier = new_multiplier;
|
EmuConfig.GS.UpscaleMultiplier = new_multiplier;
|
||||||
|
|
||||||
// this is pretty slow. we only really need to flush the TC and recompile shaders.
|
// this is pretty slow. we only really need to flush the TC and recompile shaders.
|
||||||
|
@ -973,144 +975,174 @@ static void HotkeyAdjustUpscaleMultiplier(s32 delta)
|
||||||
GetMTGS().ApplySettings();
|
GetMTGS().ApplySettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_HOTKEY_LIST(g_gs_hotkeys)
|
BEGIN_HOTKEY_LIST(g_gs_hotkeys){"Screenshot", TRANSLATE_NOOP("Hotkeys", "Graphics"),
|
||||||
{"Screenshot", "Graphics", "Save Screenshot", [](s32 pressed) {
|
TRANSLATE_NOOP("Hotkeys", "Save Screenshot"),
|
||||||
|
[](s32 pressed) {
|
||||||
if (!pressed)
|
if (!pressed)
|
||||||
{
|
{
|
||||||
GetMTGS().RunOnGSThread([]() {
|
GetMTGS().RunOnGSThread([]() { GSQueueSnapshot(std::string(), 0); });
|
||||||
GSQueueSnapshot(std::string(), 0);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
{"ToggleVideoCapture", "Graphics", "Toggle Video Capture", [](s32 pressed) {
|
{"ToggleVideoCapture", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Toggle Video Capture"),
|
||||||
if (!pressed)
|
[](s32 pressed) {
|
||||||
{
|
if (!pressed)
|
||||||
if (GSCapture::IsCapturing())
|
{
|
||||||
{
|
if (GSCapture::IsCapturing())
|
||||||
GetMTGS().RunOnGSThread([]() { g_gs_renderer->EndCapture(); });
|
{
|
||||||
GetMTGS().WaitGS(false, false, false);
|
GetMTGS().RunOnGSThread([]() { g_gs_renderer->EndCapture(); });
|
||||||
return;
|
GetMTGS().WaitGS(false, false, false);
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GetMTGS().RunOnGSThread([]() {
|
GetMTGS().RunOnGSThread([]() {
|
||||||
std::string filename(fmt::format("{}.{}", GSGetBaseVideoFilename(), GSConfig.CaptureContainer));
|
std::string filename(fmt::format("{}.{}", GSGetBaseVideoFilename(), GSConfig.CaptureContainer));
|
||||||
g_gs_renderer->BeginCapture(std::move(filename));
|
g_gs_renderer->BeginCapture(std::move(filename));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Sync GS thread. We want to start adding audio at the same time as video.
|
// Sync GS thread. We want to start adding audio at the same time as video.
|
||||||
GetMTGS().WaitGS(false, false, false);
|
GetMTGS().WaitGS(false, false, false);
|
||||||
}
|
}
|
||||||
}},
|
}},
|
||||||
{"GSDumpSingleFrame", "Graphics", "Save Single Frame GS Dump", [](s32 pressed) {
|
{"GSDumpSingleFrame", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Save Single Frame GS Dump"),
|
||||||
if (!pressed)
|
[](s32 pressed) {
|
||||||
{
|
if (!pressed)
|
||||||
GetMTGS().RunOnGSThread([]() {
|
{
|
||||||
GSQueueSnapshot(std::string(), 1);
|
GetMTGS().RunOnGSThread([]() { GSQueueSnapshot(std::string(), 1); });
|
||||||
|
}
|
||||||
|
}},
|
||||||
|
{"GSDumpMultiFrame", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Save Multi Frame GS Dump"),
|
||||||
|
[](s32 pressed) {
|
||||||
|
GetMTGS().RunOnGSThread([pressed]() {
|
||||||
|
if (pressed > 0)
|
||||||
|
GSQueueSnapshot(std::string(), std::numeric_limits<u32>::max());
|
||||||
|
else
|
||||||
|
GSStopGSDump();
|
||||||
});
|
});
|
||||||
}
|
}},
|
||||||
}},
|
{"ToggleSoftwareRendering", TRANSLATE_NOOP("Hotkeys", "Graphics"),
|
||||||
{"GSDumpMultiFrame", "Graphics", "Save Multi Frame GS Dump", [](s32 pressed) {
|
TRANSLATE_NOOP("Hotkeys", "Toggle Software Rendering"),
|
||||||
GetMTGS().RunOnGSThread([pressed]() {
|
[](s32 pressed) {
|
||||||
if (pressed > 0)
|
if (!pressed)
|
||||||
GSQueueSnapshot(std::string(), std::numeric_limits<u32>::max());
|
GetMTGS().ToggleSoftwareRendering();
|
||||||
else
|
}},
|
||||||
GSStopGSDump();
|
{"IncreaseUpscaleMultiplier", TRANSLATE_NOOP("Hotkeys", "Graphics"),
|
||||||
});
|
TRANSLATE_NOOP("Hotkeys", "Increase Upscale Multiplier"),
|
||||||
}},
|
[](s32 pressed) {
|
||||||
{"ToggleSoftwareRendering", "Graphics", "Toggle Software Rendering", [](s32 pressed) {
|
if (!pressed)
|
||||||
if (!pressed)
|
HotkeyAdjustUpscaleMultiplier(1);
|
||||||
GetMTGS().ToggleSoftwareRendering();
|
}},
|
||||||
}},
|
{"DecreaseUpscaleMultiplier", TRANSLATE_NOOP("Hotkeys", "Graphics"),
|
||||||
{"IncreaseUpscaleMultiplier", "Graphics", "Increase Upscale Multiplier", [](s32 pressed) {
|
TRANSLATE_NOOP("Hotkeys", "Decrease Upscale Multiplier"),
|
||||||
if (!pressed)
|
[](s32 pressed) {
|
||||||
HotkeyAdjustUpscaleMultiplier(1);
|
if (!pressed)
|
||||||
}},
|
HotkeyAdjustUpscaleMultiplier(-1);
|
||||||
{"DecreaseUpscaleMultiplier", "Graphics", "Decrease Upscale Multiplier", [](s32 pressed) {
|
}},
|
||||||
if (!pressed)
|
{"CycleAspectRatio", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Cycle Aspect Ratio"),
|
||||||
HotkeyAdjustUpscaleMultiplier(-1);
|
[](s32 pressed) {
|
||||||
}},
|
if (pressed)
|
||||||
{"CycleAspectRatio", "Graphics", "Cycle Aspect Ratio", [](s32 pressed) {
|
return;
|
||||||
if (pressed)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// technically this races, but the worst that'll happen is one frame uses the old AR.
|
// technically this races, but the worst that'll happen is one frame uses the old AR.
|
||||||
EmuConfig.CurrentAspectRatio = static_cast<AspectRatioType>((static_cast<int>(EmuConfig.CurrentAspectRatio) + 1) % static_cast<int>(AspectRatioType::MaxCount));
|
EmuConfig.CurrentAspectRatio = static_cast<AspectRatioType>(
|
||||||
Host::AddKeyedFormattedOSDMessage("CycleAspectRatio", Host::OSD_QUICK_DURATION, "Aspect ratio set to '%s'.", Pcsx2Config::GSOptions::AspectRatioNames[static_cast<int>(EmuConfig.CurrentAspectRatio)]);
|
(static_cast<int>(EmuConfig.CurrentAspectRatio) + 1) % static_cast<int>(AspectRatioType::MaxCount));
|
||||||
}},
|
Host::AddKeyedOSDMessage("CycleAspectRatio",
|
||||||
{"CycleMipmapMode", "Graphics", "Cycle Hardware Mipmapping", [](s32 pressed) {
|
fmt::format(TRANSLATE_SV("Hotkeys", "Aspect ratio set to '{}'."),
|
||||||
if (pressed)
|
Pcsx2Config::GSOptions::AspectRatioNames[static_cast<int>(EmuConfig.CurrentAspectRatio)]),
|
||||||
return;
|
Host::OSD_QUICK_DURATION);
|
||||||
|
}},
|
||||||
|
{"CycleMipmapMode", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Cycle Hardware Mipmapping"),
|
||||||
|
[](s32 pressed) {
|
||||||
|
if (pressed)
|
||||||
|
return;
|
||||||
|
|
||||||
static constexpr s32 CYCLE_COUNT = 4;
|
static constexpr s32 CYCLE_COUNT = 4;
|
||||||
static constexpr std::array<const char*, CYCLE_COUNT> option_names = {{"Automatic", "Off", "Basic (Generated)", "Full (PS2)"}};
|
static constexpr std::array<const char*, CYCLE_COUNT> option_names = {
|
||||||
|
{"Automatic", "Off", "Basic (Generated)", "Full (PS2)"}};
|
||||||
|
|
||||||
const HWMipmapLevel new_level = static_cast<HWMipmapLevel>(((static_cast<s32>(EmuConfig.GS.HWMipmap) + 2) % CYCLE_COUNT) - 1);
|
const HWMipmapLevel new_level =
|
||||||
Host::AddKeyedFormattedOSDMessage("CycleMipmapMode", Host::OSD_QUICK_DURATION, "Hardware mipmapping set to '%s'.", option_names[static_cast<s32>(new_level) + 1]);
|
static_cast<HWMipmapLevel>(((static_cast<s32>(EmuConfig.GS.HWMipmap) + 2) % CYCLE_COUNT) - 1);
|
||||||
EmuConfig.GS.HWMipmap = new_level;
|
Host::AddKeyedOSDMessage("CycleMipmapMode",
|
||||||
|
fmt::format(TRANSLATE_SV("Hotkeys", "Hardware mipmapping set to '{}'."),
|
||||||
|
option_names[static_cast<s32>(new_level) + 1]),
|
||||||
|
Host::OSD_QUICK_DURATION);
|
||||||
|
EmuConfig.GS.HWMipmap = new_level;
|
||||||
|
|
||||||
GetMTGS().RunOnGSThread([new_level]() {
|
GetMTGS().RunOnGSThread([new_level]() {
|
||||||
GSConfig.HWMipmap = new_level;
|
GSConfig.HWMipmap = new_level;
|
||||||
g_gs_renderer->PurgeTextureCache();
|
g_gs_renderer->PurgeTextureCache();
|
||||||
g_gs_renderer->PurgePool();
|
g_gs_renderer->PurgePool();
|
||||||
});
|
});
|
||||||
}},
|
}},
|
||||||
{"CycleInterlaceMode", "Graphics", "Cycle Deinterlace Mode", [](s32 pressed) {
|
{"CycleInterlaceMode", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Cycle Deinterlace Mode"),
|
||||||
if (pressed)
|
[](s32 pressed) {
|
||||||
return;
|
if (pressed)
|
||||||
|
return;
|
||||||
|
|
||||||
static constexpr std::array<const char*, static_cast<int>(GSInterlaceMode::Count)> option_names = {{
|
static constexpr std::array<const char*, static_cast<int>(GSInterlaceMode::Count)> option_names = {{
|
||||||
"Automatic",
|
"Automatic",
|
||||||
"Off",
|
"Off",
|
||||||
"Weave (Top Field First)",
|
"Weave (Top Field First)",
|
||||||
"Weave (Bottom Field First)",
|
"Weave (Bottom Field First)",
|
||||||
"Bob (Top Field First)",
|
"Bob (Top Field First)",
|
||||||
"Bob (Bottom Field First)",
|
"Bob (Bottom Field First)",
|
||||||
"Blend (Top Field First)",
|
"Blend (Top Field First)",
|
||||||
"Blend (Bottom Field First)",
|
"Blend (Bottom Field First)",
|
||||||
"Adaptive (Top Field First)",
|
"Adaptive (Top Field First)",
|
||||||
"Adaptive (Bottom Field First)",
|
"Adaptive (Bottom Field First)",
|
||||||
}};
|
}};
|
||||||
|
|
||||||
const GSInterlaceMode new_mode = static_cast<GSInterlaceMode>((static_cast<s32>(EmuConfig.GS.InterlaceMode) + 1) % static_cast<s32>(GSInterlaceMode::Count));
|
const GSInterlaceMode new_mode = static_cast<GSInterlaceMode>(
|
||||||
Host::AddKeyedFormattedOSDMessage("CycleInterlaceMode", Host::OSD_QUICK_DURATION, "Deinterlace mode set to '%s'.", option_names[static_cast<s32>(new_mode)]);
|
(static_cast<s32>(EmuConfig.GS.InterlaceMode) + 1) % static_cast<s32>(GSInterlaceMode::Count));
|
||||||
EmuConfig.GS.InterlaceMode = new_mode;
|
Host::AddKeyedOSDMessage("CycleInterlaceMode",
|
||||||
|
fmt::format(
|
||||||
|
TRANSLATE_SV("Hotkeys", "Deinterlace mode set to '{}'."), option_names[static_cast<s32>(new_mode)]),
|
||||||
|
Host::OSD_QUICK_DURATION);
|
||||||
|
EmuConfig.GS.InterlaceMode = new_mode;
|
||||||
|
|
||||||
GetMTGS().RunOnGSThread([new_mode]() { GSConfig.InterlaceMode = new_mode; });
|
GetMTGS().RunOnGSThread([new_mode]() { GSConfig.InterlaceMode = new_mode; });
|
||||||
}},
|
}},
|
||||||
{"ToggleTextureDumping", "Graphics", "Toggle Texture Dumping", [](s32 pressed) {
|
{"ToggleTextureDumping", TRANSLATE_NOOP("Hotkeys", "Graphics"), TRANSLATE_NOOP("Hotkeys", "Toggle Texture Dumping"),
|
||||||
if (!pressed)
|
[](s32 pressed) {
|
||||||
{
|
if (!pressed)
|
||||||
EmuConfig.GS.DumpReplaceableTextures = !EmuConfig.GS.DumpReplaceableTextures;
|
{
|
||||||
Host::AddKeyedOSDMessage("ToggleTextureReplacements",
|
EmuConfig.GS.DumpReplaceableTextures = !EmuConfig.GS.DumpReplaceableTextures;
|
||||||
EmuConfig.GS.DumpReplaceableTextures ? "Texture dumping is now enabled." : "Texture dumping is now disabled.",
|
Host::AddKeyedOSDMessage("ToggleTextureReplacements",
|
||||||
Host::OSD_INFO_DURATION);
|
EmuConfig.GS.DumpReplaceableTextures ? TRANSLATE_STR("Hotkeys", "Texture dumping is now enabled.") :
|
||||||
GetMTGS().ApplySettings();
|
TRANSLATE_STR("Hotkeys", "Texture dumping is now disabled."),
|
||||||
}
|
Host::OSD_INFO_DURATION);
|
||||||
}},
|
GetMTGS().ApplySettings();
|
||||||
{"ToggleTextureReplacements", "Graphics", "Toggle Texture Replacements", [](s32 pressed) {
|
}
|
||||||
if (!pressed)
|
}},
|
||||||
{
|
{"ToggleTextureReplacements", TRANSLATE_NOOP("Hotkeys", "Graphics"),
|
||||||
EmuConfig.GS.LoadTextureReplacements = !EmuConfig.GS.LoadTextureReplacements;
|
TRANSLATE_NOOP("Hotkeys", "Toggle Texture Replacements"),
|
||||||
Host::AddKeyedOSDMessage("ToggleTextureReplacements",
|
[](s32 pressed) {
|
||||||
EmuConfig.GS.LoadTextureReplacements ? "Texture replacements are now enabled." : "Texture replacements are now disabled.",
|
if (!pressed)
|
||||||
Host::OSD_INFO_DURATION);
|
{
|
||||||
GetMTGS().ApplySettings();
|
EmuConfig.GS.LoadTextureReplacements = !EmuConfig.GS.LoadTextureReplacements;
|
||||||
}
|
Host::AddKeyedOSDMessage("ToggleTextureReplacements",
|
||||||
}},
|
EmuConfig.GS.LoadTextureReplacements ?
|
||||||
{"ReloadTextureReplacements", "Graphics", "Reload Texture Replacements", [](s32 pressed) {
|
TRANSLATE_STR("Hotkeys", "Texture replacements are now enabled.") :
|
||||||
if (!pressed)
|
TRANSLATE_STR("Hotkeys", "Texture replacements are now disabled."),
|
||||||
{
|
Host::OSD_INFO_DURATION);
|
||||||
if (!EmuConfig.GS.LoadTextureReplacements)
|
GetMTGS().ApplySettings();
|
||||||
{
|
}
|
||||||
Host::AddKeyedOSDMessage("ReloadTextureReplacements", "Texture replacements are not enabled.", Host::OSD_INFO_DURATION);
|
}},
|
||||||
}
|
{"ReloadTextureReplacements", TRANSLATE_NOOP("Hotkeys", "Graphics"),
|
||||||
else
|
TRANSLATE_NOOP("Hotkeys", "Reload Texture Replacements"),
|
||||||
{
|
[](s32 pressed) {
|
||||||
Host::AddKeyedOSDMessage("ReloadTextureReplacements", "Reloading texture replacements...", Host::OSD_INFO_DURATION);
|
if (!pressed)
|
||||||
GetMTGS().RunOnGSThread([]() {
|
{
|
||||||
GSTextureReplacements::ReloadReplacementMap();
|
if (!EmuConfig.GS.LoadTextureReplacements)
|
||||||
});
|
{
|
||||||
}
|
Host::AddKeyedOSDMessage("ReloadTextureReplacements",
|
||||||
}
|
TRANSLATE_STR("Hotkeys", "Texture replacements are not enabled."), Host::OSD_INFO_DURATION);
|
||||||
}},
|
}
|
||||||
END_HOTKEY_LIST()
|
else
|
||||||
|
{
|
||||||
|
Host::AddKeyedOSDMessage("ReloadTextureReplacements",
|
||||||
|
TRANSLATE_STR("Hotkeys", "Reloading texture replacements..."), Host::OSD_INFO_DURATION);
|
||||||
|
GetMTGS().RunOnGSThread([]() { GSTextureReplacements::ReloadReplacementMap(); });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}},
|
||||||
|
END_HOTKEY_LIST()
|
||||||
|
|
|
@ -425,22 +425,30 @@ static void CompressAndWriteScreenshot(std::string filename, u32 width, u32 heig
|
||||||
|
|
||||||
std::string key(fmt::format("GSScreenshot_{}", filename));
|
std::string key(fmt::format("GSScreenshot_{}", filename));
|
||||||
|
|
||||||
if(!GSDumpReplayer::IsRunner())
|
if (!GSDumpReplayer::IsRunner())
|
||||||
Host::AddIconOSDMessage(key, ICON_FA_CAMERA, fmt::format("Saving screenshot to '{}'.", Path::GetFileName(filename)), 60.0f);
|
{
|
||||||
|
Host::AddIconOSDMessage(key, ICON_FA_CAMERA,
|
||||||
|
fmt::format(TRANSLATE_SV("GS", "Saving screenshot to '{}'."), Path::GetFileName(filename)), 60.0f);
|
||||||
|
}
|
||||||
|
|
||||||
// maybe std::async would be better here.. but it's definitely worth threading, large screenshots take a while to compress.
|
// maybe std::async would be better here.. but it's definitely worth threading, large screenshots take a while to compress.
|
||||||
std::unique_lock lock(s_screenshot_threads_mutex);
|
std::unique_lock lock(s_screenshot_threads_mutex);
|
||||||
s_screenshot_threads.emplace_back([key = std::move(key), filename = std::move(filename), image = std::move(image), quality = GSConfig.ScreenshotQuality]() {
|
s_screenshot_threads.emplace_back([key = std::move(key), filename = std::move(filename), image = std::move(image),
|
||||||
|
quality = GSConfig.ScreenshotQuality]() {
|
||||||
if (image.SaveToFile(filename.c_str(), quality))
|
if (image.SaveToFile(filename.c_str(), quality))
|
||||||
{
|
{
|
||||||
if(!GSDumpReplayer::IsRunner())
|
if (!GSDumpReplayer::IsRunner())
|
||||||
|
{
|
||||||
Host::AddIconOSDMessage(std::move(key), ICON_FA_CAMERA,
|
Host::AddIconOSDMessage(std::move(key), ICON_FA_CAMERA,
|
||||||
fmt::format("Saved screenshot to '{}'.", Path::GetFileName(filename)), Host::OSD_INFO_DURATION);
|
fmt::format(TRANSLATE_SV("GS", "Saved screenshot to '{}'."), Path::GetFileName(filename)),
|
||||||
|
Host::OSD_INFO_DURATION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(std::move(key), ICON_FA_CAMERA,
|
Host::AddIconOSDMessage(std::move(key), ICON_FA_CAMERA,
|
||||||
fmt::format("Failed to save screenshot to '{}'.", Path::GetFileName(filename), Host::OSD_ERROR_DURATION));
|
fmt::format(TRANSLATE_SV("GS", "Failed to save screenshot to '{}'."), Path::GetFileName(filename),
|
||||||
|
Host::OSD_ERROR_DURATION));
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove ourselves from the list, if the GS thread is waiting for us, we won't be in there
|
// remove ourselves from the list, if the GS thread is waiting for us, we won't be in there
|
||||||
|
@ -510,7 +518,7 @@ bool GSRenderer::BeginPresentFrame(bool frame_skip)
|
||||||
|
|
||||||
// First frame after reopening is definitely going to be trash, so skip it.
|
// First frame after reopening is definitely going to be trash, so skip it.
|
||||||
Host::AddIconOSDMessage("GSDeviceLost", ICON_FA_EXCLAMATION_TRIANGLE,
|
Host::AddIconOSDMessage("GSDeviceLost", ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
"Host GPU device encountered an error and was recovered. This may have broken rendering.",
|
TRANSLATE_SV("GS", "Host GPU device encountered an error and was recovered. This may have broken rendering."),
|
||||||
Host::OSD_CRITICAL_ERROR_DURATION);
|
Host::OSD_CRITICAL_ERROR_DURATION);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -614,7 +622,9 @@ void GSRenderer::VSync(u32 field, bool registers_written, bool idle_frame)
|
||||||
else if (!cas_log_once)
|
else if (!cas_log_once)
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("CASUnsupported", ICON_FA_EXCLAMATION_TRIANGLE,
|
Host::AddIconOSDMessage("CASUnsupported", ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
"CAS is not available, your graphics driver does not support the required functionality.", 10.0f);
|
TRANSLATE_SV("GS",
|
||||||
|
"CAS is not available, your graphics driver does not support the required functionality."),
|
||||||
|
10.0f);
|
||||||
cas_log_once = true;
|
cas_log_once = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -686,9 +696,11 @@ void GSRenderer::VSync(u32 field, bool registers_written, bool idle_frame)
|
||||||
|
|
||||||
delete[] fd.data;
|
delete[] fd.data;
|
||||||
|
|
||||||
Host::AddKeyedOSDMessage("GSDump", fmt::format("Saving {0} GS dump {1} to '{2}'",
|
Host::AddKeyedOSDMessage("GSDump",
|
||||||
(m_dump_frames == 1) ? "single frame" : "multi-frame", compression_str,
|
fmt::format(TRANSLATE_SV("GS", "Saving {0} GS dump {1} to '{2}'"),
|
||||||
Path::GetFileName(m_dump->GetPath())), Host::OSD_INFO_DURATION);
|
(m_dump_frames == 1) ? "single frame" : "multi-frame", compression_str,
|
||||||
|
Path::GetFileName(m_dump->GetPath())),
|
||||||
|
Host::OSD_INFO_DURATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool internal_resolution = (GSConfig.ScreenshotSize >= GSScreenshotSize::InternalResolution);
|
const bool internal_resolution = (GSConfig.ScreenshotSize >= GSScreenshotSize::InternalResolution);
|
||||||
|
@ -705,7 +717,8 @@ void GSRenderer::VSync(u32 field, bool registers_written, bool idle_frame)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("GSScreenshot", ICON_FA_CAMERA, "Failed to render/download screenshot.", Host::OSD_ERROR_DURATION);
|
Host::AddIconOSDMessage("GSScreenshot", ICON_FA_CAMERA,
|
||||||
|
TRANSLATE_SV("GS", "Failed to render/download screenshot."), Host::OSD_ERROR_DURATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_snapshot = {};
|
m_snapshot = {};
|
||||||
|
@ -715,7 +728,9 @@ void GSRenderer::VSync(u32 field, bool registers_written, bool idle_frame)
|
||||||
const bool last = (m_dump_frames == 0);
|
const bool last = (m_dump_frames == 0);
|
||||||
if (m_dump->VSync(field, last, m_regs))
|
if (m_dump->VSync(field, last, m_regs))
|
||||||
{
|
{
|
||||||
Host::AddKeyedOSDMessage("GSDump", fmt::format("Saved GS dump to '{}'.", Path::GetFileName(m_dump->GetPath())), Host::OSD_INFO_DURATION);
|
Host::AddKeyedOSDMessage("GSDump",
|
||||||
|
fmt::format(TRANSLATE_SV("GS", "Saved GS dump to '{}'."), Path::GetFileName(m_dump->GetPath())),
|
||||||
|
Host::OSD_INFO_DURATION);
|
||||||
m_dump.reset();
|
m_dump.reset();
|
||||||
}
|
}
|
||||||
else if (!last)
|
else if (!last)
|
||||||
|
|
|
@ -151,8 +151,10 @@ void GSRendererHW::VSync(u32 field, bool registers_written, bool idle_frame)
|
||||||
|
|
||||||
if (g_texture_cache->GetHashCacheMemoryUsage() > 1024 * 1024 * 1024)
|
if (g_texture_cache->GetHashCacheMemoryUsage() > 1024 * 1024 * 1024)
|
||||||
{
|
{
|
||||||
Host::AddKeyedFormattedOSDMessage("HashCacheOverflow", Host::OSD_ERROR_DURATION, "Hash cache has used %.2f MB of VRAM, disabling.",
|
Host::AddKeyedOSDMessage("HashCacheOverflow",
|
||||||
static_cast<float>(g_texture_cache->GetHashCacheMemoryUsage()) / 1048576.0f);
|
fmt::format(TRANSLATE_SV("GS", "Hash cache has used {:.2f} MB of VRAM, disabling."),
|
||||||
|
static_cast<float>(g_texture_cache->GetHashCacheMemoryUsage()) / 1048576.0f),
|
||||||
|
Host::OSD_ERROR_DURATION);
|
||||||
g_texture_cache->RemoveAll();
|
g_texture_cache->RemoveAll();
|
||||||
g_gs_device->PurgePool();
|
g_gs_device->PurgePool();
|
||||||
GSConfig.TexturePreloading = TexturePreloadingLevel::Partial;
|
GSConfig.TexturePreloading = TexturePreloadingLevel::Partial;
|
||||||
|
|
|
@ -575,10 +575,11 @@ GSTexture* GSTextureReplacements::CreateReplacementTexture(const ReplacementText
|
||||||
static bool log_once = false;
|
static bool log_once = false;
|
||||||
if (!log_once)
|
if (!log_once)
|
||||||
{
|
{
|
||||||
static const char* message =
|
Console.Warning("Disabling autogenerated mipmaps on one or more compressed replacement textures.");
|
||||||
"Disabling autogenerated mipmaps on one or more compressed replacement textures. Please generate mipmaps when compressing your textures.";
|
Host::AddIconOSDMessage("DisablingReplacementAutoGeneratedMipmap", ICON_FA_EXCLAMATION_CIRCLE,
|
||||||
Console.Warning(message);
|
TRANSLATE_SV("GS", "Disabling autogenerated mipmaps on one or more compressed replacement textures. "
|
||||||
Host::AddIconOSDMessage("DisablingReplacementAutoGeneratedMipmap", ICON_FA_EXCLAMATION_CIRCLE, message, Host::OSD_WARNING_DURATION);
|
"Please generate mipmaps when compressing your textures."),
|
||||||
|
Host::OSD_WARNING_DURATION);
|
||||||
log_once = true;
|
log_once = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -764,7 +764,7 @@ bool GSDeviceVK::CheckFeatures()
|
||||||
if (!m_features.texture_barrier && !m_features.stencil_buffer)
|
if (!m_features.texture_barrier && !m_features.stencil_buffer)
|
||||||
{
|
{
|
||||||
Host::AddKeyedOSDMessage("GSDeviceVK_NoTextureBarrierOrStencilBuffer",
|
Host::AddKeyedOSDMessage("GSDeviceVK_NoTextureBarrierOrStencilBuffer",
|
||||||
"Stencil buffers and texture barriers are both unavailable, this will break some graphical effects.",
|
TRANSLATE_STR("GS", "Stencil buffers and texture barriers are both unavailable, this will break some graphical effects."),
|
||||||
Host::OSD_WARNING_DURATION);
|
Host::OSD_WARNING_DURATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2939,7 +2939,8 @@ void GSDeviceVK::ExecuteCommandBufferForReadback()
|
||||||
{
|
{
|
||||||
m_warned_slow_spin = true;
|
m_warned_slow_spin = true;
|
||||||
Host::AddKeyedOSDMessage("GSDeviceVK_NoCalibratedTimestamps",
|
Host::AddKeyedOSDMessage("GSDeviceVK_NoCalibratedTimestamps",
|
||||||
"Spin GPU During Readbacks is enabled, but calibrated timestamps are unavailable. This might be really slow.",
|
TRANSLATE_STR("GS", "Spin GPU During Readbacks is enabled, but calibrated timestamps are unavailable. "
|
||||||
|
"This might be really slow."),
|
||||||
Host::OSD_WARNING_DURATION);
|
Host::OSD_WARNING_DURATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -868,11 +868,14 @@ u32 GameDatabaseSchema::GameEntry::applyGSHardwareFixes(Pcsx2Config::GSOptions&
|
||||||
if (value >= 0 && value <= static_cast<int>(AccBlendLevel::Maximum) && static_cast<int>(EmuConfig.GS.AccurateBlendingUnit) < value)
|
if (value >= 0 && value <= static_cast<int>(AccBlendLevel::Maximum) && static_cast<int>(EmuConfig.GS.AccurateBlendingUnit) < value)
|
||||||
{
|
{
|
||||||
Host::AddKeyedOSDMessage("HWBlendingWarning",
|
Host::AddKeyedOSDMessage("HWBlendingWarning",
|
||||||
fmt::format(ICON_FA_PAINT_BRUSH " Current Blending Accuracy is {}.\n"
|
fmt::format(TRANSLATE_SV("GameDatabase",
|
||||||
"Recommended Blending Accuracy for this game is {}.\n"
|
"{0} Current Blending Accuracy is {1}.\n"
|
||||||
"You can adjust the blending level in Game Properties to improve\n"
|
"Recommended Blending Accuracy for this game is {2}.\n"
|
||||||
"graphical quality, but this will increase system requirements.",
|
"You can adjust the blending level in Game Properties to improve\n"
|
||||||
Pcsx2Config::GSOptions::BlendingLevelNames[static_cast<int>(EmuConfig.GS.AccurateBlendingUnit)],
|
"graphical quality, but this will increase system requirements."),
|
||||||
|
ICON_FA_PAINT_BRUSH,
|
||||||
|
Pcsx2Config::GSOptions::BlendingLevelNames[static_cast<int>(
|
||||||
|
EmuConfig.GS.AccurateBlendingUnit)],
|
||||||
Pcsx2Config::GSOptions::BlendingLevelNames[value]),
|
Pcsx2Config::GSOptions::BlendingLevelNames[value]),
|
||||||
Host::OSD_WARNING_DURATION);
|
Host::OSD_WARNING_DURATION);
|
||||||
}
|
}
|
||||||
|
@ -905,8 +908,9 @@ u32 GameDatabaseSchema::GameEntry::applyGSHardwareFixes(Pcsx2Config::GSOptions&
|
||||||
if (!disabled_fixes.empty())
|
if (!disabled_fixes.empty())
|
||||||
{
|
{
|
||||||
Host::AddKeyedOSDMessage("HWFixesWarning",
|
Host::AddKeyedOSDMessage("HWFixesWarning",
|
||||||
fmt::format(ICON_FA_MAGIC " Manual GS hardware renderer fixes are enabled, automatic fixes were not applied:\n{}",
|
fmt::format(ICON_FA_MAGIC " {}\n{}",
|
||||||
disabled_fixes),
|
TRANSLATE_SV("Manual GS hardware renderer fixes are enabled, automatic fixes were not applied:",
|
||||||
|
disabled_fixes)),
|
||||||
Host::OSD_ERROR_DURATION);
|
Host::OSD_ERROR_DURATION);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -45,7 +45,9 @@ static void HotkeyAdjustTargetSpeed(double delta)
|
||||||
EmuConfig.LimiterMode = LimiterModeType::Unlimited; // force update
|
EmuConfig.LimiterMode = LimiterModeType::Unlimited; // force update
|
||||||
VMManager::SetLimiterMode(LimiterModeType::Nominal);
|
VMManager::SetLimiterMode(LimiterModeType::Nominal);
|
||||||
Host::AddIconOSDMessage("SpeedChanged", ICON_FA_CLOCK,
|
Host::AddIconOSDMessage("SpeedChanged", ICON_FA_CLOCK,
|
||||||
fmt::format("Target speed set to {:.0f}%.", std::round(EmuConfig.Framerate.NominalScalar * 100.0)), Host::OSD_QUICK_DURATION);
|
fmt::format(TRANSLATE_SV("Hotkeys", "Target speed set to {:.0f}%."),
|
||||||
|
std::round(EmuConfig.Framerate.NominalScalar * 100.0)),
|
||||||
|
Host::OSD_QUICK_DURATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void HotkeyAdjustVolume(s32 fixed, s32 delta)
|
static void HotkeyAdjustVolume(s32 fixed, s32 delta)
|
||||||
|
@ -54,18 +56,19 @@ static void HotkeyAdjustVolume(s32 fixed, s32 delta)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const s32 current_vol = SPU2::GetOutputVolume();
|
const s32 current_vol = SPU2::GetOutputVolume();
|
||||||
const s32 new_volume = std::clamp((fixed >= 0) ? fixed : (current_vol + delta), 0, Pcsx2Config::SPU2Options::MAX_VOLUME);
|
const s32 new_volume =
|
||||||
|
std::clamp((fixed >= 0) ? fixed : (current_vol + delta), 0, Pcsx2Config::SPU2Options::MAX_VOLUME);
|
||||||
if (current_vol != new_volume)
|
if (current_vol != new_volume)
|
||||||
SPU2::SetOutputVolume(new_volume);
|
SPU2::SetOutputVolume(new_volume);
|
||||||
|
|
||||||
if (new_volume == 0)
|
if (new_volume == 0)
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("VolumeChanged", ICON_FA_VOLUME_MUTE, "Volume: Muted");
|
Host::AddIconOSDMessage("VolumeChanged", ICON_FA_VOLUME_MUTE, TRANSLATE_STR("Hotkeys", "Volume: Muted"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(
|
Host::AddIconOSDMessage("VolumeChanged", (current_vol < new_volume) ? ICON_FA_VOLUME_UP : ICON_FA_VOLUME_DOWN,
|
||||||
"VolumeChanged", (current_vol < new_volume) ? ICON_FA_VOLUME_UP : ICON_FA_VOLUME_DOWN, fmt::format("Volume: {}%", new_volume));
|
fmt::format(TRANSLATE_SV("Hotkeys", "Volume: {}%"), new_volume));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,11 +102,14 @@ static void HotkeyCycleSaveSlot(s32 delta)
|
||||||
date_buf[len - 1] = 0;
|
date_buf[len - 1] = 0;
|
||||||
|
|
||||||
Host::AddIconOSDMessage("CycleSaveSlot", ICON_FA_SEARCH,
|
Host::AddIconOSDMessage("CycleSaveSlot", ICON_FA_SEARCH,
|
||||||
fmt::format("Save slot {} selected (last save: {}).", s_current_save_slot, date_buf), Host::OSD_QUICK_DURATION);
|
fmt::format(
|
||||||
|
TRANSLATE_SV("Hotkeys", "Save slot {} selected (last save: {})."), s_current_save_slot, date_buf),
|
||||||
|
Host::OSD_QUICK_DURATION);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("CycleSaveSlot", ICON_FA_SEARCH, fmt::format("Save slot {} selected (no save yet).", s_current_save_slot),
|
Host::AddIconOSDMessage("CycleSaveSlot", ICON_FA_SEARCH,
|
||||||
|
fmt::format(TRANSLATE_SV("Hotkeys", "Save slot {} selected (no save yet)."), s_current_save_slot),
|
||||||
Host::OSD_QUICK_DURATION);
|
Host::OSD_QUICK_DURATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,8 +120,8 @@ static void HotkeyLoadStateSlot(s32 slot)
|
||||||
Host::RunOnCPUThread([slot]() {
|
Host::RunOnCPUThread([slot]() {
|
||||||
if (!VMManager::HasSaveStateInSlot(VMManager::GetDiscSerial().c_str(), VMManager::GetDiscCRC(), slot))
|
if (!VMManager::HasSaveStateInSlot(VMManager::GetDiscSerial().c_str(), VMManager::GetDiscCRC(), slot))
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("LoadStateFromSlot", ICON_FA_EXCLAMATION_TRIANGLE, fmt::format("No save state found in slot {}.", slot),
|
Host::AddIconOSDMessage("LoadStateFromSlot", ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
Host::OSD_INFO_DURATION);
|
fmt::format(TRANSLATE_SV("Hotkeys", "No save state found in slot {}."), slot), Host::OSD_INFO_DURATION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -129,146 +135,171 @@ static void HotkeySaveStateSlot(s32 slot)
|
||||||
}
|
}
|
||||||
|
|
||||||
BEGIN_HOTKEY_LIST(g_common_hotkeys)
|
BEGIN_HOTKEY_LIST(g_common_hotkeys)
|
||||||
DEFINE_HOTKEY("OpenPauseMenu", "System", "Open Pause Menu", [](s32 pressed) {
|
DEFINE_HOTKEY("OpenPauseMenu", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Open Pause Menu"),
|
||||||
if (!pressed && VMManager::HasValidVM())
|
[](s32 pressed) {
|
||||||
FullscreenUI::OpenPauseMenu();
|
if (!pressed && VMManager::HasValidVM())
|
||||||
})
|
FullscreenUI::OpenPauseMenu();
|
||||||
|
})
|
||||||
#ifdef ENABLE_ACHIEVEMENTS
|
#ifdef ENABLE_ACHIEVEMENTS
|
||||||
DEFINE_HOTKEY("OpenAchievementsList", "System", "Open Achievements List", [](s32 pressed) {
|
DEFINE_HOTKEY("OpenAchievementsList", TRANSLATE_NOOP("Hotkeys", "System"),
|
||||||
if (!pressed)
|
TRANSLATE_NOOP("Hotkeys", "Open Achievements List"), [](s32 pressed) {
|
||||||
FullscreenUI::OpenAchievementsWindow();
|
if (!pressed)
|
||||||
})
|
FullscreenUI::OpenAchievementsWindow();
|
||||||
DEFINE_HOTKEY("OpenLeaderboardsList", "System", "Open Leaderboards List", [](s32 pressed) {
|
})
|
||||||
if (!pressed)
|
DEFINE_HOTKEY("OpenLeaderboardsList", TRANSLATE_NOOP("Hotkeys", "System"),
|
||||||
FullscreenUI::OpenLeaderboardsWindow();
|
TRANSLATE_NOOP("Hotkeys", "Open Leaderboards List"), [](s32 pressed) {
|
||||||
})
|
if (!pressed)
|
||||||
|
FullscreenUI::OpenLeaderboardsWindow();
|
||||||
|
})
|
||||||
#endif
|
#endif
|
||||||
DEFINE_HOTKEY("TogglePause", "System", "Toggle Pause", [](s32 pressed) {
|
DEFINE_HOTKEY(
|
||||||
if (!pressed && VMManager::HasValidVM())
|
"TogglePause", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Toggle Pause"), [](s32 pressed) {
|
||||||
VMManager::SetPaused(VMManager::GetState() != VMState::Paused);
|
if (!pressed && VMManager::HasValidVM())
|
||||||
})
|
VMManager::SetPaused(VMManager::GetState() != VMState::Paused);
|
||||||
DEFINE_HOTKEY("ToggleFullscreen", "System", "Toggle Fullscreen", [](s32 pressed) {
|
})
|
||||||
if (!pressed)
|
DEFINE_HOTKEY("ToggleFullscreen", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Toggle Fullscreen"),
|
||||||
Host::SetFullscreen(!Host::IsFullscreen());
|
[](s32 pressed) {
|
||||||
})
|
if (!pressed)
|
||||||
DEFINE_HOTKEY("ToggleFrameLimit", "System", "Toggle Frame Limit", [](s32 pressed) {
|
Host::SetFullscreen(!Host::IsFullscreen());
|
||||||
if (!pressed && VMManager::HasValidVM())
|
})
|
||||||
{
|
DEFINE_HOTKEY("ToggleFrameLimit", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Toggle Frame Limit"),
|
||||||
VMManager::SetLimiterMode(
|
[](s32 pressed) {
|
||||||
(EmuConfig.LimiterMode != LimiterModeType::Unlimited) ? LimiterModeType::Unlimited : LimiterModeType::Nominal);
|
if (!pressed && VMManager::HasValidVM())
|
||||||
}
|
{
|
||||||
})
|
VMManager::SetLimiterMode((EmuConfig.LimiterMode != LimiterModeType::Unlimited) ?
|
||||||
DEFINE_HOTKEY("ToggleTurbo", "System", "Toggle Turbo / Fast Forward", [](s32 pressed) {
|
LimiterModeType::Unlimited :
|
||||||
if (!pressed && VMManager::HasValidVM())
|
LimiterModeType::Nominal);
|
||||||
{
|
}
|
||||||
VMManager::SetLimiterMode((EmuConfig.LimiterMode != LimiterModeType::Turbo) ? LimiterModeType::Turbo : LimiterModeType::Nominal);
|
})
|
||||||
}
|
DEFINE_HOTKEY("ToggleTurbo", TRANSLATE_NOOP("Hotkeys", "System"),
|
||||||
})
|
TRANSLATE_NOOP("Hotkeys", "Toggle Turbo / Fast Forward"), [](s32 pressed) {
|
||||||
DEFINE_HOTKEY("ToggleSlowMotion", "System", "Toggle Slow Motion", [](s32 pressed) {
|
if (!pressed && VMManager::HasValidVM())
|
||||||
if (!pressed && VMManager::HasValidVM())
|
{
|
||||||
{
|
VMManager::SetLimiterMode(
|
||||||
VMManager::SetLimiterMode((EmuConfig.LimiterMode != LimiterModeType::Slomo) ? LimiterModeType::Slomo : LimiterModeType::Nominal);
|
(EmuConfig.LimiterMode != LimiterModeType::Turbo) ? LimiterModeType::Turbo : LimiterModeType::Nominal);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
DEFINE_HOTKEY("HoldTurbo", "System", "Turbo / Fast Forward (Hold)", [](s32 pressed) {
|
DEFINE_HOTKEY("ToggleSlowMotion", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Toggle Slow Motion"),
|
||||||
if (!VMManager::HasValidVM())
|
[](s32 pressed) {
|
||||||
return;
|
if (!pressed && VMManager::HasValidVM())
|
||||||
if (pressed > 0 && !s_limiter_mode_prior_to_hold_interaction.has_value())
|
{
|
||||||
{
|
VMManager::SetLimiterMode(
|
||||||
s_limiter_mode_prior_to_hold_interaction = VMManager::GetLimiterMode();
|
(EmuConfig.LimiterMode != LimiterModeType::Slomo) ? LimiterModeType::Slomo : LimiterModeType::Nominal);
|
||||||
VMManager::SetLimiterMode((s_limiter_mode_prior_to_hold_interaction.value() != LimiterModeType::Turbo) ? LimiterModeType::Turbo :
|
}
|
||||||
LimiterModeType::Nominal);
|
})
|
||||||
}
|
DEFINE_HOTKEY("HoldTurbo", TRANSLATE_NOOP("Hotkeys", "System"),
|
||||||
else if (pressed >= 0 && s_limiter_mode_prior_to_hold_interaction.has_value())
|
TRANSLATE_NOOP("Hotkeys", "Turbo / Fast Forward (Hold)"), [](s32 pressed) {
|
||||||
{
|
if (!VMManager::HasValidVM())
|
||||||
VMManager::SetLimiterMode(s_limiter_mode_prior_to_hold_interaction.value());
|
return;
|
||||||
s_limiter_mode_prior_to_hold_interaction.reset();
|
if (pressed > 0 && !s_limiter_mode_prior_to_hold_interaction.has_value())
|
||||||
}
|
{
|
||||||
})
|
s_limiter_mode_prior_to_hold_interaction = VMManager::GetLimiterMode();
|
||||||
DEFINE_HOTKEY("IncreaseSpeed", "System", "Increase Target Speed", [](s32 pressed) {
|
VMManager::SetLimiterMode((s_limiter_mode_prior_to_hold_interaction.value() != LimiterModeType::Turbo) ?
|
||||||
if (!pressed && VMManager::HasValidVM())
|
LimiterModeType::Turbo :
|
||||||
HotkeyAdjustTargetSpeed(0.1);
|
LimiterModeType::Nominal);
|
||||||
})
|
}
|
||||||
DEFINE_HOTKEY("DecreaseSpeed", "System", "Decrease Target Speed", [](s32 pressed) {
|
else if (pressed >= 0 && s_limiter_mode_prior_to_hold_interaction.has_value())
|
||||||
if (!pressed && VMManager::HasValidVM())
|
{
|
||||||
HotkeyAdjustTargetSpeed(-0.1);
|
VMManager::SetLimiterMode(s_limiter_mode_prior_to_hold_interaction.value());
|
||||||
})
|
s_limiter_mode_prior_to_hold_interaction.reset();
|
||||||
DEFINE_HOTKEY("IncreaseVolume", "System", "Increase Volume", [](s32 pressed) {
|
}
|
||||||
if (!pressed && VMManager::HasValidVM())
|
})
|
||||||
HotkeyAdjustVolume(-1, 5);
|
DEFINE_HOTKEY("IncreaseSpeed", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Increase Target Speed"),
|
||||||
})
|
[](s32 pressed) {
|
||||||
DEFINE_HOTKEY("DecreaseVolume", "System", "Decrease Volume", [](s32 pressed) {
|
if (!pressed && VMManager::HasValidVM())
|
||||||
if (!pressed && VMManager::HasValidVM())
|
HotkeyAdjustTargetSpeed(0.1);
|
||||||
HotkeyAdjustVolume(-1, -5);
|
})
|
||||||
})
|
DEFINE_HOTKEY("DecreaseSpeed", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Decrease Target Speed"),
|
||||||
DEFINE_HOTKEY("Mute", "System", "Toggle Mute", [](s32 pressed) {
|
[](s32 pressed) {
|
||||||
|
if (!pressed && VMManager::HasValidVM())
|
||||||
|
HotkeyAdjustTargetSpeed(-0.1);
|
||||||
|
})
|
||||||
|
DEFINE_HOTKEY("IncreaseVolume", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Increase Volume"),
|
||||||
|
[](s32 pressed) {
|
||||||
|
if (!pressed && VMManager::HasValidVM())
|
||||||
|
HotkeyAdjustVolume(-1, 5);
|
||||||
|
})
|
||||||
|
DEFINE_HOTKEY("DecreaseVolume", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Decrease Volume"),
|
||||||
|
[](s32 pressed) {
|
||||||
|
if (!pressed && VMManager::HasValidVM())
|
||||||
|
HotkeyAdjustVolume(-1, -5);
|
||||||
|
})
|
||||||
|
DEFINE_HOTKEY("Mute", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Toggle Mute"), [](s32 pressed) {
|
||||||
if (!pressed && VMManager::HasValidVM())
|
if (!pressed && VMManager::HasValidVM())
|
||||||
HotkeyAdjustVolume((SPU2::GetOutputVolume() == 0) ? EmuConfig.SPU2.FinalVolume : 0, 0);
|
HotkeyAdjustVolume((SPU2::GetOutputVolume() == 0) ? EmuConfig.SPU2.FinalVolume : 0, 0);
|
||||||
})
|
})
|
||||||
DEFINE_HOTKEY("FrameAdvance", "System", "Frame Advance", [](s32 pressed) {
|
DEFINE_HOTKEY(
|
||||||
if (!pressed && VMManager::HasValidVM())
|
"FrameAdvance", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Frame Advance"), [](s32 pressed) {
|
||||||
VMManager::FrameAdvance(1);
|
if (!pressed && VMManager::HasValidVM())
|
||||||
})
|
VMManager::FrameAdvance(1);
|
||||||
DEFINE_HOTKEY("ShutdownVM", "System", "Shut Down Virtual Machine", [](s32 pressed) {
|
})
|
||||||
if (!pressed && VMManager::HasValidVM())
|
DEFINE_HOTKEY("ShutdownVM", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Shut Down Virtual Machine"),
|
||||||
Host::RequestVMShutdown(true, true, EmuConfig.SaveStateOnShutdown);
|
[](s32 pressed) {
|
||||||
})
|
if (!pressed && VMManager::HasValidVM())
|
||||||
DEFINE_HOTKEY("ResetVM", "System", "Reset Virtual Machine", [](s32 pressed) {
|
Host::RequestVMShutdown(true, true, EmuConfig.SaveStateOnShutdown);
|
||||||
if (!pressed && VMManager::HasValidVM())
|
})
|
||||||
VMManager::Reset();
|
DEFINE_HOTKEY("ResetVM", TRANSLATE_NOOP("Hotkeys", "System"), TRANSLATE_NOOP("Hotkeys", "Reset Virtual Machine"),
|
||||||
})
|
[](s32 pressed) {
|
||||||
DEFINE_HOTKEY("InputRecToggleMode", "System", "Toggle Input Recording Mode", [](s32 pressed) {
|
if (!pressed && VMManager::HasValidVM())
|
||||||
if (!pressed && VMManager::HasValidVM())
|
VMManager::Reset();
|
||||||
g_InputRecording.getControls().toggleRecordMode();
|
})
|
||||||
})
|
DEFINE_HOTKEY("InputRecToggleMode", TRANSLATE_NOOP("Hotkeys", "System"),
|
||||||
|
TRANSLATE_NOOP("Hotkeys", "Toggle Input Recording Mode"), [](s32 pressed) {
|
||||||
|
if (!pressed && VMManager::HasValidVM())
|
||||||
|
g_InputRecording.getControls().toggleRecordMode();
|
||||||
|
})
|
||||||
|
|
||||||
DEFINE_HOTKEY("PreviousSaveStateSlot", "Save States", "Select Previous Save Slot", [](s32 pressed) {
|
DEFINE_HOTKEY("PreviousSaveStateSlot", TRANSLATE_NOOP("Hotkeys", "Save States"),
|
||||||
if (!pressed && VMManager::HasValidVM())
|
TRANSLATE_NOOP("Hotkeys", "Select Previous Save Slot"), [](s32 pressed) {
|
||||||
HotkeyCycleSaveSlot(-1);
|
if (!pressed && VMManager::HasValidVM())
|
||||||
})
|
HotkeyCycleSaveSlot(-1);
|
||||||
DEFINE_HOTKEY("NextSaveStateSlot", "Save States", "Select Next Save Slot", [](s32 pressed) {
|
})
|
||||||
if (!pressed && VMManager::HasValidVM())
|
DEFINE_HOTKEY("NextSaveStateSlot", TRANSLATE_NOOP("Hotkeys", "Save States"),
|
||||||
HotkeyCycleSaveSlot(1);
|
TRANSLATE_NOOP("Hotkeys", "Select Next Save Slot"), [](s32 pressed) {
|
||||||
})
|
if (!pressed && VMManager::HasValidVM())
|
||||||
DEFINE_HOTKEY("SaveStateToSlot", "Save States", "Save State To Selected Slot", [](s32 pressed) {
|
HotkeyCycleSaveSlot(1);
|
||||||
if (!pressed && VMManager::HasValidVM())
|
})
|
||||||
VMManager::SaveStateToSlot(s_current_save_slot);
|
DEFINE_HOTKEY("SaveStateToSlot", TRANSLATE_NOOP("Hotkeys", "Save States"),
|
||||||
})
|
TRANSLATE_NOOP("Hotkeys", "Save State To Selected Slot"), [](s32 pressed) {
|
||||||
DEFINE_HOTKEY("LoadStateFromSlot", "Save States", "Load State From Selected Slot", [](s32 pressed) {
|
if (!pressed && VMManager::HasValidVM())
|
||||||
if (!pressed && VMManager::HasValidVM())
|
VMManager::SaveStateToSlot(s_current_save_slot);
|
||||||
HotkeyLoadStateSlot(s_current_save_slot);
|
})
|
||||||
})
|
DEFINE_HOTKEY("LoadStateFromSlot", TRANSLATE_NOOP("Hotkeys", "Save States"),
|
||||||
|
TRANSLATE_NOOP("Hotkeys", "Load State From Selected Slot"), [](s32 pressed) {
|
||||||
|
if (!pressed && VMManager::HasValidVM())
|
||||||
|
HotkeyLoadStateSlot(s_current_save_slot);
|
||||||
|
})
|
||||||
|
|
||||||
#define DEFINE_HOTKEY_SAVESTATE_X(slotnum) \
|
#define DEFINE_HOTKEY_SAVESTATE_X(slotnum, title) \
|
||||||
DEFINE_HOTKEY("SaveStateToSlot" #slotnum, "Save States", "Save State To Slot " #slotnum, [](s32 pressed) { \
|
DEFINE_HOTKEY("SaveStateToSlot" #slotnum, "Save States", title, [](s32 pressed) { \
|
||||||
if (!pressed) \
|
if (!pressed) \
|
||||||
HotkeySaveStateSlot(slotnum); \
|
HotkeySaveStateSlot(slotnum); \
|
||||||
})
|
})
|
||||||
#define DEFINE_HOTKEY_LOADSTATE_X(slotnum) \
|
#define DEFINE_HOTKEY_LOADSTATE_X(slotnum, title) \
|
||||||
DEFINE_HOTKEY("LoadStateFromSlot" #slotnum, "Save States", "Load State From Slot " #slotnum, [](s32 pressed) { \
|
DEFINE_HOTKEY("LoadStateFromSlot" #slotnum, "Save States", title, [](s32 pressed) { \
|
||||||
if (!pressed) \
|
if (!pressed) \
|
||||||
HotkeyLoadStateSlot(slotnum); \
|
HotkeyLoadStateSlot(slotnum); \
|
||||||
})
|
})
|
||||||
DEFINE_HOTKEY_SAVESTATE_X(1)
|
DEFINE_HOTKEY_SAVESTATE_X(1, TRANSLATE_NOOP("Hotkeys", "Save State To Slot 1"))
|
||||||
DEFINE_HOTKEY_LOADSTATE_X(1)
|
DEFINE_HOTKEY_LOADSTATE_X(1, TRANSLATE_NOOP("Hotkeys", "Load State From Slot 1"))
|
||||||
DEFINE_HOTKEY_SAVESTATE_X(2)
|
DEFINE_HOTKEY_SAVESTATE_X(2, TRANSLATE_NOOP("Hotkeys", "Save State To Slot 2"))
|
||||||
DEFINE_HOTKEY_LOADSTATE_X(2)
|
DEFINE_HOTKEY_LOADSTATE_X(2, TRANSLATE_NOOP("Hotkeys", "Load State From Slot 2"))
|
||||||
DEFINE_HOTKEY_SAVESTATE_X(3)
|
DEFINE_HOTKEY_SAVESTATE_X(3, TRANSLATE_NOOP("Hotkeys", "Save State To Slot 3"))
|
||||||
DEFINE_HOTKEY_LOADSTATE_X(3)
|
DEFINE_HOTKEY_LOADSTATE_X(3, TRANSLATE_NOOP("Hotkeys", "Load State From Slot 3"))
|
||||||
DEFINE_HOTKEY_SAVESTATE_X(4)
|
DEFINE_HOTKEY_SAVESTATE_X(4, TRANSLATE_NOOP("Hotkeys", "Save State To Slot 4"))
|
||||||
DEFINE_HOTKEY_LOADSTATE_X(4)
|
DEFINE_HOTKEY_LOADSTATE_X(4, TRANSLATE_NOOP("Hotkeys", "Load State From Slot 4"))
|
||||||
DEFINE_HOTKEY_SAVESTATE_X(5)
|
DEFINE_HOTKEY_SAVESTATE_X(5, TRANSLATE_NOOP("Hotkeys", "Save State To Slot 5"))
|
||||||
DEFINE_HOTKEY_LOADSTATE_X(5)
|
DEFINE_HOTKEY_LOADSTATE_X(5, TRANSLATE_NOOP("Hotkeys", "Load State From Slot 5"))
|
||||||
DEFINE_HOTKEY_SAVESTATE_X(6)
|
DEFINE_HOTKEY_SAVESTATE_X(6, TRANSLATE_NOOP("Hotkeys", "Save State To Slot 6"))
|
||||||
DEFINE_HOTKEY_LOADSTATE_X(6)
|
DEFINE_HOTKEY_LOADSTATE_X(6, TRANSLATE_NOOP("Hotkeys", "Load State From Slot 6"))
|
||||||
DEFINE_HOTKEY_SAVESTATE_X(7)
|
DEFINE_HOTKEY_SAVESTATE_X(7, TRANSLATE_NOOP("Hotkeys", "Save State To Slot 7"))
|
||||||
DEFINE_HOTKEY_LOADSTATE_X(7)
|
DEFINE_HOTKEY_LOADSTATE_X(7, TRANSLATE_NOOP("Hotkeys", "Load State From Slot 7"))
|
||||||
DEFINE_HOTKEY_SAVESTATE_X(8)
|
DEFINE_HOTKEY_SAVESTATE_X(8, TRANSLATE_NOOP("Hotkeys", "Save State To Slot 8"))
|
||||||
DEFINE_HOTKEY_LOADSTATE_X(8)
|
DEFINE_HOTKEY_LOADSTATE_X(8, TRANSLATE_NOOP("Hotkeys", "Load State From Slot 8"))
|
||||||
DEFINE_HOTKEY_SAVESTATE_X(9)
|
DEFINE_HOTKEY_SAVESTATE_X(9, TRANSLATE_NOOP("Hotkeys", "Save State To Slot 9"))
|
||||||
DEFINE_HOTKEY_LOADSTATE_X(9)
|
DEFINE_HOTKEY_LOADSTATE_X(9, TRANSLATE_NOOP("Hotkeys", "Load State From Slot 9"))
|
||||||
DEFINE_HOTKEY_SAVESTATE_X(10)
|
DEFINE_HOTKEY_SAVESTATE_X(10, TRANSLATE_NOOP("Hotkeys", "Save State To Slot 10"))
|
||||||
DEFINE_HOTKEY_LOADSTATE_X(10)
|
DEFINE_HOTKEY_LOADSTATE_X(10, TRANSLATE_NOOP("Hotkeys", "Load State From Slot 10"))
|
||||||
#undef DEFINE_HOTKEY_SAVESTATE_X
|
#undef DEFINE_HOTKEY_SAVESTATE_X
|
||||||
#undef DEFINE_HOTKEY_LOADSTATE_X
|
#undef DEFINE_HOTKEY_LOADSTATE_X
|
||||||
END_HOTKEY_LIST()
|
END_HOTKEY_LIST()
|
||||||
|
|
|
@ -535,7 +535,8 @@ s32 FileMemoryCard::Save(uint slot, const u8* src, u32 adr, int size)
|
||||||
if (elapsed > std::chrono::seconds(5))
|
if (elapsed > std::chrono::seconds(5))
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(fmt::format("MemoryCardSave{}", slot), ICON_FA_SD_CARD,
|
Host::AddIconOSDMessage(fmt::format("MemoryCardSave{}", slot), ICON_FA_SD_CARD,
|
||||||
fmt::format("Memory card '{}' was saved to storage.", Path::GetFileName(m_filenames[slot])),
|
fmt::format(TRANSLATE_SV("MemoryCard", "Memory card '{}' was saved to storage."),
|
||||||
|
Path::GetFileName(m_filenames[slot])),
|
||||||
Host::OSD_INFO_DURATION);
|
Host::OSD_INFO_DURATION);
|
||||||
last = std::chrono::system_clock::now();
|
last = std::chrono::system_clock::now();
|
||||||
}
|
}
|
||||||
|
|
|
@ -2359,7 +2359,8 @@ s32 FolderMemoryCardAggregator::Save(uint slot, const u8* src, u32 adr, int size
|
||||||
{
|
{
|
||||||
const std::string_view filename = Path::GetFileName(m_cards[slot].GetFolderName());
|
const std::string_view filename = Path::GetFileName(m_cards[slot].GetFolderName());
|
||||||
Host::AddIconOSDMessage(fmt::format("MemoryCardSave{}", slot), ICON_FA_SD_CARD,
|
Host::AddIconOSDMessage(fmt::format("MemoryCardSave{}", slot), ICON_FA_SD_CARD,
|
||||||
fmt::format("Memory card '{}' was saved to storage.", filename), Host::OSD_INFO_DURATION);
|
fmt::format(TRANSLATE_SV("MemoryCard", "Memory card '{}' was saved to storage."), filename),
|
||||||
|
Host::OSD_INFO_DURATION);
|
||||||
|
|
||||||
last = std::chrono::system_clock::now();
|
last = std::chrono::system_clock::now();
|
||||||
}
|
}
|
||||||
|
|
|
@ -351,88 +351,86 @@ void PAD::Update()
|
||||||
}
|
}
|
||||||
|
|
||||||
static const InputBindingInfo s_dualshock2_binds[] = {
|
static const InputBindingInfo s_dualshock2_binds[] = {
|
||||||
{"Up", "D-Pad Up", InputBindingInfo::Type::Button, PAD_UP, GenericInputBinding::DPadUp},
|
{"Up", TRANSLATE_NOOP("Pad", "D-Pad Up"), InputBindingInfo::Type::Button, PAD_UP, GenericInputBinding::DPadUp},
|
||||||
{"Right", "D-Pad Right", InputBindingInfo::Type::Button, PAD_RIGHT, GenericInputBinding::DPadRight},
|
{"Right", TRANSLATE_NOOP("Pad", "D-Pad Right"), InputBindingInfo::Type::Button, PAD_RIGHT, GenericInputBinding::DPadRight},
|
||||||
{"Down", "D-Pad Down", InputBindingInfo::Type::Button, PAD_DOWN, GenericInputBinding::DPadDown},
|
{"Down", TRANSLATE_NOOP("Pad", "D-Pad Down"), InputBindingInfo::Type::Button, PAD_DOWN, GenericInputBinding::DPadDown},
|
||||||
{"Left", "D-Pad Left", InputBindingInfo::Type::Button, PAD_LEFT, GenericInputBinding::DPadLeft},
|
{"Left", TRANSLATE_NOOP("Pad", "D-Pad Left"), InputBindingInfo::Type::Button, PAD_LEFT, GenericInputBinding::DPadLeft},
|
||||||
{"Triangle", "Triangle", InputBindingInfo::Type::Button, PAD_TRIANGLE, GenericInputBinding::Triangle},
|
{"Triangle", TRANSLATE_NOOP("Pad", "Triangle"), InputBindingInfo::Type::Button, PAD_TRIANGLE, GenericInputBinding::Triangle},
|
||||||
{"Circle", "Circle", InputBindingInfo::Type::Button, PAD_CIRCLE, GenericInputBinding::Circle},
|
{"Circle", TRANSLATE_NOOP("Pad", "Circle"), InputBindingInfo::Type::Button, PAD_CIRCLE, GenericInputBinding::Circle},
|
||||||
{"Cross", "Cross", InputBindingInfo::Type::Button, PAD_CROSS, GenericInputBinding::Cross},
|
{"Cross", TRANSLATE_NOOP("Pad", "Cross"), InputBindingInfo::Type::Button, PAD_CROSS, GenericInputBinding::Cross},
|
||||||
{"Square", "Square", InputBindingInfo::Type::Button, PAD_SQUARE, GenericInputBinding::Square},
|
{"Square", TRANSLATE_NOOP("Pad", "Square"), InputBindingInfo::Type::Button, PAD_SQUARE, GenericInputBinding::Square},
|
||||||
{"Select", "Select", InputBindingInfo::Type::Button, PAD_SELECT, GenericInputBinding::Select},
|
{"Select", TRANSLATE_NOOP("Pad", "Select"), InputBindingInfo::Type::Button, PAD_SELECT, GenericInputBinding::Select},
|
||||||
{"Start", "Start", InputBindingInfo::Type::Button, PAD_START, GenericInputBinding::Start},
|
{"Start", TRANSLATE_NOOP("Pad", "Start"), InputBindingInfo::Type::Button, PAD_START, GenericInputBinding::Start},
|
||||||
{"L1", "L1 (Left Bumper)", InputBindingInfo::Type::Button, PAD_L1, GenericInputBinding::L1},
|
{"L1", TRANSLATE_NOOP("Pad", "L1 (Left Bumper)"), InputBindingInfo::Type::Button, PAD_L1, GenericInputBinding::L1},
|
||||||
{"L2", "L2 (Left Trigger)", InputBindingInfo::Type::HalfAxis, PAD_L2, GenericInputBinding::L2},
|
{"L2", TRANSLATE_NOOP("Pad", "L2 (Left Trigger)"), InputBindingInfo::Type::HalfAxis, PAD_L2, GenericInputBinding::L2},
|
||||||
{"R1", "R1 (Right Bumper)", InputBindingInfo::Type::Button, PAD_R1, GenericInputBinding::R1},
|
{"R1", TRANSLATE_NOOP("Pad", "R1 (Right Bumper)"), InputBindingInfo::Type::Button, PAD_R1, GenericInputBinding::R1},
|
||||||
{"R2", "R2 (Right Trigger)", InputBindingInfo::Type::HalfAxis, PAD_R2, GenericInputBinding::R2},
|
{"R2", TRANSLATE_NOOP("Pad", "R2 (Right Trigger)"), InputBindingInfo::Type::HalfAxis, PAD_R2, GenericInputBinding::R2},
|
||||||
{"L3", "L3 (Left Stick Button)", InputBindingInfo::Type::Button, PAD_L3, GenericInputBinding::L3},
|
{"L3", TRANSLATE_NOOP("Pad", "L3 (Left Stick Button)"), InputBindingInfo::Type::Button, PAD_L3, GenericInputBinding::L3},
|
||||||
{"R3", "R3 (Right Stick Button)", InputBindingInfo::Type::Button, PAD_R3, GenericInputBinding::R3},
|
{"R3", TRANSLATE_NOOP("Pad", "R3 (Right Stick Button)"), InputBindingInfo::Type::Button, PAD_R3, GenericInputBinding::R3},
|
||||||
{"Analog", "Analog Toggle", InputBindingInfo::Type::Button, PAD_ANALOG, GenericInputBinding::System},
|
{"Analog", TRANSLATE_NOOP("Pad", "Analog Toggle"), InputBindingInfo::Type::Button, PAD_ANALOG, GenericInputBinding::System},
|
||||||
{"Pressure", "Apply Pressure", InputBindingInfo::Type::Button, PAD_PRESSURE, GenericInputBinding::Unknown},
|
{"Pressure", TRANSLATE_NOOP("Pad", "Apply Pressure"), InputBindingInfo::Type::Button, PAD_PRESSURE, GenericInputBinding::Unknown},
|
||||||
{"LUp", "Left Stick Up", InputBindingInfo::Type::HalfAxis, PAD_L_UP, GenericInputBinding::LeftStickUp},
|
{"LUp", TRANSLATE_NOOP("Pad", "Left Stick Up"), InputBindingInfo::Type::HalfAxis, PAD_L_UP, GenericInputBinding::LeftStickUp},
|
||||||
{"LRight", "Left Stick Right", InputBindingInfo::Type::HalfAxis, PAD_L_RIGHT, GenericInputBinding::LeftStickRight},
|
{"LRight", TRANSLATE_NOOP("Pad", "Left Stick Right"), InputBindingInfo::Type::HalfAxis, PAD_L_RIGHT, GenericInputBinding::LeftStickRight},
|
||||||
{"LDown", "Left Stick Down", InputBindingInfo::Type::HalfAxis, PAD_L_DOWN, GenericInputBinding::LeftStickDown},
|
{"LDown", TRANSLATE_NOOP("Pad", "Left Stick Down"), InputBindingInfo::Type::HalfAxis, PAD_L_DOWN, GenericInputBinding::LeftStickDown},
|
||||||
{"LLeft", "Left Stick Left", InputBindingInfo::Type::HalfAxis, PAD_L_LEFT, GenericInputBinding::LeftStickLeft},
|
{"LLeft", TRANSLATE_NOOP("Pad", "Left Stick Left"), InputBindingInfo::Type::HalfAxis, PAD_L_LEFT, GenericInputBinding::LeftStickLeft},
|
||||||
{"RUp", "Right Stick Up", InputBindingInfo::Type::HalfAxis, PAD_R_UP, GenericInputBinding::RightStickUp},
|
{"RUp", TRANSLATE_NOOP("Pad", "Right Stick Up"), InputBindingInfo::Type::HalfAxis, PAD_R_UP, GenericInputBinding::RightStickUp},
|
||||||
{"RRight", "Right Stick Right", InputBindingInfo::Type::HalfAxis, PAD_R_RIGHT, GenericInputBinding::RightStickRight},
|
{"RRight", TRANSLATE_NOOP("Pad", "Right Stick Right"), InputBindingInfo::Type::HalfAxis, PAD_R_RIGHT, GenericInputBinding::RightStickRight},
|
||||||
{"RDown", "Right Stick Down", InputBindingInfo::Type::HalfAxis, PAD_R_DOWN, GenericInputBinding::RightStickDown},
|
{"RDown", TRANSLATE_NOOP("Pad", "Right Stick Down"), InputBindingInfo::Type::HalfAxis, PAD_R_DOWN, GenericInputBinding::RightStickDown},
|
||||||
{"RLeft", "Right Stick Left", InputBindingInfo::Type::HalfAxis, PAD_R_LEFT, GenericInputBinding::RightStickLeft},
|
{"RLeft", TRANSLATE_NOOP("Pad", "Right Stick Left"), InputBindingInfo::Type::HalfAxis, PAD_R_LEFT, GenericInputBinding::RightStickLeft},
|
||||||
{"LargeMotor", "Large (Low Frequency) Motor", InputBindingInfo::Type::Motor, 0, GenericInputBinding::LargeMotor},
|
{"LargeMotor", TRANSLATE_NOOP("Pad", "Large (Low Frequency) Motor"), InputBindingInfo::Type::Motor, 0, GenericInputBinding::LargeMotor},
|
||||||
{"SmallMotor", "Small (High Frequency) Motor", InputBindingInfo::Type::Motor, 0, GenericInputBinding::SmallMotor},
|
{"SmallMotor", TRANSLATE_NOOP("Pad", "Small (High Frequency) Motor"), InputBindingInfo::Type::Motor, 0, GenericInputBinding::SmallMotor},
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char* s_dualshock2_invert_entries[] = {
|
static const char* s_dualshock2_invert_entries[] = {
|
||||||
"Not Inverted",
|
TRANSLATE_NOOP("Pad", "Not Inverted"),
|
||||||
"Invert Left/Right",
|
TRANSLATE_NOOP("Pad", "Invert Left/Right"),
|
||||||
"Invert Up/Down",
|
TRANSLATE_NOOP("Pad", "Invert Up/Down"),
|
||||||
"Invert Left/Right + Up/Down",
|
TRANSLATE_NOOP("Pad", "Invert Left/Right + Up/Down"),
|
||||||
nullptr};
|
nullptr};
|
||||||
|
|
||||||
static const SettingInfo s_dualshock2_settings[] = {
|
static const SettingInfo s_dualshock2_settings[] = {
|
||||||
{SettingInfo::Type::IntegerList, "InvertL", "Invert Left Stick",
|
{SettingInfo::Type::IntegerList, "InvertL", TRANSLATE_NOOP("Pad", "Invert Left Stick"),
|
||||||
"Inverts the direction of the left analog stick.",
|
TRANSLATE_NOOP("Pad", "Inverts the direction of the left analog stick."), "0", "0", "3", nullptr, nullptr,
|
||||||
"0", "0", "3", nullptr, nullptr, s_dualshock2_invert_entries, nullptr, 0.0f},
|
s_dualshock2_invert_entries, nullptr, 0.0f},
|
||||||
{SettingInfo::Type::IntegerList, "InvertR", "Invert Right Stick",
|
{SettingInfo::Type::IntegerList, "InvertR", TRANSLATE_NOOP("Pad", "Invert Right Stick"),
|
||||||
"Inverts the direction of the right analog stick.",
|
TRANSLATE_NOOP("Pad", "Inverts the direction of the right analog stick."), "0", "0", "3", nullptr, nullptr,
|
||||||
"0", "0", "3", nullptr, nullptr, s_dualshock2_invert_entries, nullptr, 0.0f},
|
s_dualshock2_invert_entries, nullptr, 0.0f},
|
||||||
{SettingInfo::Type::Float, "Deadzone", "Analog Deadzone",
|
{SettingInfo::Type::Float, "Deadzone", TRANSLATE_NOOP("Pad", "Analog Deadzone"),
|
||||||
"Sets the analog stick deadzone, i.e. the fraction of the analog stick movement which will be ignored.",
|
TRANSLATE_NOOP("Pad",
|
||||||
|
"Sets the analog stick deadzone, i.e. the fraction of the analog stick movement which will be ignored."),
|
||||||
"0.00", "0.00", "1.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
"0.00", "0.00", "1.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
||||||
{SettingInfo::Type::Float, "AxisScale", "Analog Sensitivity",
|
{SettingInfo::Type::Float, "AxisScale", TRANSLATE_NOOP("Pad", "Analog Sensitivity"),
|
||||||
"Sets the analog stick axis scaling factor. A value between 130% and 140% is recommended when using recent "
|
TRANSLATE_NOOP("Pad",
|
||||||
"controllers, e.g. DualShock 4, Xbox One Controller.",
|
"Sets the analog stick axis scaling factor. A value between 130% and 140% is recommended when using recent "
|
||||||
|
"controllers, e.g. DualShock 4, Xbox One Controller."),
|
||||||
"1.33", "0.01", "2.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
"1.33", "0.01", "2.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
||||||
{SettingInfo::Type::Float, "TriggerDeadzone", "Trigger Deadzone",
|
{SettingInfo::Type::Float, "TriggerDeadzone", TRANSLATE_NOOP("Pad", "Trigger Deadzone"),
|
||||||
"Sets the deadzone for activating triggers, i.e. the fraction of the trigger press which will be ignored.",
|
TRANSLATE_NOOP("Pad",
|
||||||
|
"Sets the deadzone for activating triggers, i.e. the fraction of the trigger press which will be ignored."),
|
||||||
"0.00", "0.00", "1.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
"0.00", "0.00", "1.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
||||||
{SettingInfo::Type::Float, "TriggerScale", "Trigger Sensitivity",
|
{SettingInfo::Type::Float, "TriggerScale", TRANSLATE_NOOP("Pad", "Trigger Sensitivity"),
|
||||||
"Sets the trigger scaling factor.",
|
TRANSLATE_NOOP("Pad", "Sets the trigger scaling factor."), "1.00", "0.01", "2.00", "0.01", "%.0f%%", nullptr,
|
||||||
"1.00", "0.01", "2.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
nullptr, 100.0f},
|
||||||
{SettingInfo::Type::Float, "LargeMotorScale", "Large Motor Vibration Scale",
|
{SettingInfo::Type::Float, "LargeMotorScale", TRANSLATE_NOOP("Pad", "Large Motor Vibration Scale"),
|
||||||
"Increases or decreases the intensity of low frequency vibration sent by the game.",
|
TRANSLATE_NOOP("Pad", "Increases or decreases the intensity of low frequency vibration sent by the game."),
|
||||||
"1.00", "0.00", "2.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
"1.00", "0.00", "2.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
||||||
{SettingInfo::Type::Float, "SmallMotorScale", "Small Motor Vibration Scale",
|
{SettingInfo::Type::Float, "SmallMotorScale", TRANSLATE_NOOP("Pad", "Small Motor Vibration Scale"),
|
||||||
"Increases or decreases the intensity of high frequency vibration sent by the game.",
|
TRANSLATE_NOOP("Pad", "Increases or decreases the intensity of high frequency vibration sent by the game."),
|
||||||
"1.00", "0.00", "2.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
"1.00", "0.00", "2.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
||||||
{SettingInfo::Type::Float, "ButtonDeadzone", "Button Deadzone",
|
{SettingInfo::Type::Float, "ButtonDeadzone", TRANSLATE_NOOP("Pad", "Button Deadzone"),
|
||||||
"Sets the deadzone for activating buttons, i.e. the fraction of the button press which will be ignored.",
|
TRANSLATE_NOOP("Pad",
|
||||||
|
"Sets the deadzone for activating buttons, i.e. the fraction of the button press which will be ignored."),
|
||||||
"0.00", "0.00", "1.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
"0.00", "0.00", "1.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
||||||
/*{SettingInfo::Type::Float, "InitialPressure", "Initial Pressure",
|
{SettingInfo::Type::Float, "PressureModifier", TRANSLATE_NOOP("Pad", "Modifier Pressure"),
|
||||||
"Sets the pressure when the modifier button isn't held.",
|
TRANSLATE_NOOP("Pad", "Sets the pressure when the modifier button is held."), "0.50", "0.01", "1.00", "0.01",
|
||||||
"1.00", "0.01", "1.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},*/
|
"%.0f%%", nullptr, nullptr, 100.0f},
|
||||||
{SettingInfo::Type::Float, "PressureModifier", "Modifier Pressure",
|
|
||||||
"Sets the pressure when the modifier button is held.",
|
|
||||||
"0.50", "0.01", "1.00", "0.01", "%.0f%%", nullptr, nullptr, 100.0f},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const PAD::ControllerInfo s_controller_info[] = {
|
static const PAD::ControllerInfo s_controller_info[] = {
|
||||||
{PAD::ControllerType::NotConnected, "None", "Not Connected",
|
{PAD::ControllerType::NotConnected, "None", TRANSLATE_NOOP("Pad", "Not Connected"), nullptr, 0, nullptr, 0,
|
||||||
nullptr, 0,
|
|
||||||
nullptr, 0,
|
|
||||||
PAD::VibrationCapabilities::NoVibration},
|
PAD::VibrationCapabilities::NoVibration},
|
||||||
{PAD::ControllerType::DualShock2, "DualShock2", "DualShock 2",
|
{PAD::ControllerType::DualShock2, "DualShock2", TRANSLATE_NOOP("Pad", "DualShock 2"), s_dualshock2_binds,
|
||||||
s_dualshock2_binds, std::size(s_dualshock2_binds),
|
std::size(s_dualshock2_binds), s_dualshock2_settings, std::size(s_dualshock2_settings),
|
||||||
s_dualshock2_settings, std::size(s_dualshock2_settings),
|
|
||||||
PAD::VibrationCapabilities::LargeSmallMotors},
|
PAD::VibrationCapabilities::LargeSmallMotors},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -297,7 +297,8 @@ bool Patch::OpenPatchesZip()
|
||||||
if (!warning_shown)
|
if (!warning_shown)
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("PatchesZipOpenWarning", ICON_FA_MICROCHIP,
|
Host::AddIconOSDMessage("PatchesZipOpenWarning", ICON_FA_MICROCHIP,
|
||||||
fmt::format("Failed to open {}. Built-in game patches are not available.", PATCHES_ZIP_NAME),
|
fmt::format(TRANSLATE_SV("Patch", "Failed to open {}. Built-in game patches are not available."),
|
||||||
|
PATCHES_ZIP_NAME),
|
||||||
Host::OSD_ERROR_DURATION);
|
Host::OSD_ERROR_DURATION);
|
||||||
warning_shown = true;
|
warning_shown = true;
|
||||||
}
|
}
|
||||||
|
@ -519,7 +520,8 @@ u32 Patch::EnablePatches(const PatchList& patches, const EnablePatchList& enable
|
||||||
return count;
|
return count;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Patch::ReloadPatches(const std::string& serial, u32 crc, bool reload_files, bool reload_enabled_list, bool verbose, bool verbose_if_changed)
|
void Patch::ReloadPatches(const std::string& serial, u32 crc, bool reload_files, bool reload_enabled_list, bool verbose,
|
||||||
|
bool verbose_if_changed)
|
||||||
{
|
{
|
||||||
reload_files |= (s_patches_crc != crc);
|
reload_files |= (s_patches_crc != crc);
|
||||||
s_patches_crc = crc;
|
s_patches_crc = crc;
|
||||||
|
@ -578,16 +580,22 @@ void Patch::UpdateActivePatches(bool reload_enabled_list, bool verbose, bool ver
|
||||||
{
|
{
|
||||||
gp_count = EnablePatches(s_gamedb_patches, EnablePatchList());
|
gp_count = EnablePatches(s_gamedb_patches, EnablePatchList());
|
||||||
if (gp_count > 0)
|
if (gp_count > 0)
|
||||||
fmt::format_to(std::back_inserter(message), "{} GameDB patches", gp_count);
|
fmt::format_to(std::back_inserter(message), TRANSLATE_SV("Patch", "{} GameDB patches"), gp_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
const u32 p_count = EnablePatches(s_game_patches, s_enabled_patches);
|
const u32 p_count = EnablePatches(s_game_patches, s_enabled_patches);
|
||||||
if (p_count > 0)
|
if (p_count > 0)
|
||||||
fmt::format_to(std::back_inserter(message), "{}{} game patches", message.empty() ? "" : ", ", p_count);
|
{
|
||||||
|
fmt::format_to(std::back_inserter(message), TRANSLATE_SV("Patch", "{}{} game patches"),
|
||||||
|
message.empty() ? "" : ", ", p_count);
|
||||||
|
}
|
||||||
|
|
||||||
const u32 c_count = EmuConfig.EnableCheats ? EnablePatches(s_cheat_patches, s_enabled_cheats) : 0;
|
const u32 c_count = EmuConfig.EnableCheats ? EnablePatches(s_cheat_patches, s_enabled_cheats) : 0;
|
||||||
if (c_count > 0)
|
if (c_count > 0)
|
||||||
fmt::format_to(std::back_inserter(message), "{}{} cheat patches", message.empty() ? "" : ", ", c_count);
|
{
|
||||||
|
fmt::format_to(std::back_inserter(message), TRANSLATE_SV("Patch", "{}{} cheat patches"),
|
||||||
|
message.empty() ? "" : ", ", c_count);
|
||||||
|
}
|
||||||
|
|
||||||
// Display message on first boot when we load patches.
|
// Display message on first boot when we load patches.
|
||||||
// Except when it's just GameDB.
|
// Except when it's just GameDB.
|
||||||
|
@ -596,13 +604,14 @@ void Patch::UpdateActivePatches(bool reload_enabled_list, bool verbose, bool ver
|
||||||
{
|
{
|
||||||
if (!message.empty())
|
if (!message.empty())
|
||||||
{
|
{
|
||||||
fmt::format_to(std::back_inserter(message), " are active.");
|
Host::AddIconOSDMessage("LoadPatches", ICON_FA_FILE_CODE,
|
||||||
Host::AddIconOSDMessage("LoadPatches", ICON_FA_FILE_CODE, std::move(message), Host::OSD_INFO_DURATION);
|
fmt::format(TRANSLATE_SV("{} are active.", message)), Host::OSD_INFO_DURATION);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("LoadPatches", ICON_FA_FILE_CODE,
|
Host::AddIconOSDMessage("LoadPatches", ICON_FA_FILE_CODE,
|
||||||
"No cheats or patches (widescreen, compatibility or others) are found / enabled.",
|
TRANSLATE_STR(
|
||||||
|
"Patch", "No cheats or patches (widescreen, compatibility or others) are found / enabled."),
|
||||||
Host::OSD_INFO_DURATION);
|
Host::OSD_INFO_DURATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -292,7 +292,9 @@ public:
|
||||||
if (!selected_device)
|
if (!selected_device)
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("CubebDeviceNotFound", ICON_FA_VOLUME_MUTE,
|
Host::AddIconOSDMessage("CubebDeviceNotFound", ICON_FA_VOLUME_MUTE,
|
||||||
fmt::format("Requested audio output device '{}' not found, using default.", selected_device_name),
|
fmt::format(
|
||||||
|
TRANSLATE_SV("SPU2", "Requested audio output device '{}' not found, using default."),
|
||||||
|
selected_device_name),
|
||||||
Host::OSD_WARNING_DURATION);
|
Host::OSD_WARNING_DURATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -208,12 +208,10 @@ void Sio0::SetTxData(u8 value)
|
||||||
|
|
||||||
if (mcd->autoEjectTicks == 0)
|
if (mcd->autoEjectTicks == 0)
|
||||||
{
|
{
|
||||||
Host::AddKeyedFormattedOSDMessage(
|
Host::AddKeyedOSDMessage(fmt::format("AutoEjectSlotClear{}{}", port, slot),
|
||||||
StringUtil::StdStringFromFormat("AutoEjectSlotClear%u%u", port, slot),
|
fmt::format(TRANSLATE_SV("MemoryCard", "Memory card in port %d / slot %d reinserted"),
|
||||||
10.0f,
|
port + 1, slot + 1),
|
||||||
"Memory card in port %d / slot %d reinserted",
|
Host::OSD_INFO_DURATION);
|
||||||
port + 1,
|
|
||||||
slot + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -591,12 +589,10 @@ void Sio2::Memcard()
|
||||||
|
|
||||||
if (mcd->autoEjectTicks == 0)
|
if (mcd->autoEjectTicks == 0)
|
||||||
{
|
{
|
||||||
Host::AddKeyedFormattedOSDMessage(
|
Host::AddKeyedOSDMessage(fmt::format("AutoEjectSlotClear{}{}", port, slot),
|
||||||
StringUtil::StdStringFromFormat("AutoEjectSlotClear%u%u", port, slot),
|
fmt::format(
|
||||||
10.0f,
|
TRANSLATE_SV("MemoryCard", "Memory card in port {} / slot {} reinserted."), port + 1, slot + 1),
|
||||||
"Memory card in port %d / slot %d reinserted",
|
Host::OSD_INFO_DURATION);
|
||||||
port + 1,
|
|
||||||
slot + 1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -934,7 +930,8 @@ void AutoEject::Clear(size_t port, size_t slot)
|
||||||
|
|
||||||
void AutoEject::SetAll()
|
void AutoEject::SetAll()
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("AutoEjectAllSet", ICON_FA_SD_CARD, "Force ejecting all memory cards.", Host::OSD_INFO_DURATION);
|
Host::AddIconOSDMessage("AutoEjectAllSet", ICON_FA_SD_CARD,
|
||||||
|
TRANSLATE_SV("MemoryCard", "Force ejecting all memory cards."), Host::OSD_INFO_DURATION);
|
||||||
|
|
||||||
for (size_t port = 0; port < SIO::PORTS; port++)
|
for (size_t port = 0; port < SIO::PORTS; port++)
|
||||||
{
|
{
|
||||||
|
|
|
@ -550,7 +550,7 @@ const char* USB::DeviceTypeIndexToName(s32 device)
|
||||||
{
|
{
|
||||||
RegisterDevice& rd = RegisterDevice::instance();
|
RegisterDevice& rd = RegisterDevice::instance();
|
||||||
const DeviceProxy* proxy = (device != DEVTYPE_NONE) ? rd.Device(device) : nullptr;
|
const DeviceProxy* proxy = (device != DEVTYPE_NONE) ? rd.Device(device) : nullptr;
|
||||||
return proxy ? proxy->TypeName() : "None";
|
return proxy ? proxy->TypeName() : TRANSLATE("USB", "None");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::pair<const char*, const char*>> USB::GetDeviceTypes()
|
std::vector<std::pair<const char*, const char*>> USB::GetDeviceTypes()
|
||||||
|
@ -558,7 +558,7 @@ std::vector<std::pair<const char*, const char*>> USB::GetDeviceTypes()
|
||||||
RegisterDevice& rd = RegisterDevice::instance();
|
RegisterDevice& rd = RegisterDevice::instance();
|
||||||
std::vector<std::pair<const char*, const char*>> ret;
|
std::vector<std::pair<const char*, const char*>> ret;
|
||||||
ret.reserve(rd.Map().size() + 1);
|
ret.reserve(rd.Map().size() + 1);
|
||||||
ret.emplace_back("None", "Not Connected");
|
ret.emplace_back("None", TRANSLATE("USB", "Not Connected"));
|
||||||
for (const auto& it : rd.Map())
|
for (const auto& it : rd.Map())
|
||||||
ret.emplace_back(it.second->TypeName(), it.second->Name());
|
ret.emplace_back(it.second->TypeName(), it.second->Name());
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -567,7 +567,7 @@ std::vector<std::pair<const char*, const char*>> USB::GetDeviceTypes()
|
||||||
const char* USB::GetDeviceName(const std::string_view& device)
|
const char* USB::GetDeviceName(const std::string_view& device)
|
||||||
{
|
{
|
||||||
const DeviceProxy* dev = RegisterDevice::instance().Device(device);
|
const DeviceProxy* dev = RegisterDevice::instance().Device(device);
|
||||||
return dev ? dev->Name() : "Not Connected";
|
return dev ? dev->Name() : TRANSLATE("USB", "Not Connected");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* USB::GetDeviceSubtypeName(const std::string_view& device, u32 subtype)
|
const char* USB::GetDeviceSubtypeName(const std::string_view& device, u32 subtype)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* PCSX2 - PS2 Emulator for PCs
|
/* PCSX2 - PS2 Emulator for PCs
|
||||||
* Copyright (C) 2002-2020 PCSX2 Dev Team
|
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||||
*
|
*
|
||||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
|
#include "Host.h"
|
||||||
#include "videodev.h"
|
#include "videodev.h"
|
||||||
#include "usb-eyetoy-webcam.h"
|
#include "usb-eyetoy-webcam.h"
|
||||||
#include "ov519.h"
|
#include "ov519.h"
|
||||||
|
@ -485,7 +486,7 @@ namespace usb_eyetoy
|
||||||
|
|
||||||
const char* EyeToyWebCamDevice::Name() const
|
const char* EyeToyWebCamDevice::Name() const
|
||||||
{
|
{
|
||||||
return "Webcam (EyeToy)";
|
return TRANSLATE_NOOP("USB", "Webcam (EyeToy)");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* EyeToyWebCamDevice::TypeName() const
|
const char* EyeToyWebCamDevice::TypeName() const
|
||||||
|
@ -515,15 +516,17 @@ namespace usb_eyetoy
|
||||||
|
|
||||||
gsl::span<const char*> EyeToyWebCamDevice::SubTypes() const
|
gsl::span<const char*> EyeToyWebCamDevice::SubTypes() const
|
||||||
{
|
{
|
||||||
static const char* subtypes[] = {"Sony EyeToy", "Konami Capture Eye"};
|
static const char* subtypes[] = {
|
||||||
|
TRANSLATE_NOOP("USB", "Sony EyeToy"), TRANSLATE_NOOP("USB", "Konami Capture Eye")};
|
||||||
return subtypes;
|
return subtypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
gsl::span<const SettingInfo> EyeToyWebCamDevice::Settings(u32 subtype) const
|
gsl::span<const SettingInfo> EyeToyWebCamDevice::Settings(u32 subtype) const
|
||||||
{
|
{
|
||||||
static constexpr const SettingInfo info[] = {
|
static constexpr const SettingInfo info[] = {
|
||||||
{SettingInfo::Type::StringList, "device_name", "Device Name", "Selects the device to capture images from.", "", nullptr,
|
{SettingInfo::Type::StringList, "device_name", TRANSLATE_NOOP("USB", "Device Name"),
|
||||||
nullptr, nullptr, nullptr, nullptr, &VideoDevice::GetDeviceList},
|
TRANSLATE_NOOP("USB", "Selects the device to capture images from."), "", nullptr, nullptr, nullptr,
|
||||||
|
nullptr, nullptr, &VideoDevice::GetDeviceList},
|
||||||
};
|
};
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
|
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
|
|
||||||
|
#include "Host.h"
|
||||||
#include "Input/InputManager.h"
|
#include "Input/InputManager.h"
|
||||||
#include "StateWrapper.h"
|
#include "StateWrapper.h"
|
||||||
#include "USB/USB.h"
|
#include "USB/USB.h"
|
||||||
|
@ -939,7 +940,7 @@ namespace usb_hid
|
||||||
|
|
||||||
const char* HIDKbdDevice::Name() const
|
const char* HIDKbdDevice::Name() const
|
||||||
{
|
{
|
||||||
return "HID Keyboard";
|
return TRANSLATE_NOOP("USB", "HID Keyboard");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* HIDKbdDevice::TypeName() const
|
const char* HIDKbdDevice::TypeName() const
|
||||||
|
@ -950,7 +951,7 @@ namespace usb_hid
|
||||||
gsl::span<const InputBindingInfo> HIDKbdDevice::Bindings(u32 subtype) const
|
gsl::span<const InputBindingInfo> HIDKbdDevice::Bindings(u32 subtype) const
|
||||||
{
|
{
|
||||||
static constexpr const InputBindingInfo info[] = {
|
static constexpr const InputBindingInfo info[] = {
|
||||||
{"Keyboard", "Keyboard", InputBindingInfo::Type::Keyboard, 0, GenericInputBinding::Unknown},
|
{"Keyboard", TRANSLATE_NOOP("USB", "Keyboard"), InputBindingInfo::Type::Keyboard, 0, GenericInputBinding::Unknown},
|
||||||
};
|
};
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -1013,7 +1014,7 @@ namespace usb_hid
|
||||||
|
|
||||||
const char* HIDMouseDevice::Name() const
|
const char* HIDMouseDevice::Name() const
|
||||||
{
|
{
|
||||||
return "HID Mouse";
|
return TRANSLATE_NOOP("USB", "HID Mouse");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* HIDMouseDevice::TypeName() const
|
const char* HIDMouseDevice::TypeName() const
|
||||||
|
@ -1043,10 +1044,10 @@ namespace usb_hid
|
||||||
gsl::span<const InputBindingInfo> HIDMouseDevice::Bindings(u32 subtype) const
|
gsl::span<const InputBindingInfo> HIDMouseDevice::Bindings(u32 subtype) const
|
||||||
{
|
{
|
||||||
static constexpr const InputBindingInfo info[] = {
|
static constexpr const InputBindingInfo info[] = {
|
||||||
{"Pointer", "Pointer", InputBindingInfo::Type::Pointer, INPUT_BUTTON__MAX, GenericInputBinding::Unknown},
|
{"Pointer", TRANSLATE_NOOP("USB", "Pointer"), InputBindingInfo::Type::Pointer, INPUT_BUTTON__MAX, GenericInputBinding::Unknown},
|
||||||
{"LeftButton", "Left Button", InputBindingInfo::Type::Button, INPUT_BUTTON_LEFT, GenericInputBinding::Unknown},
|
{"LeftButton", TRANSLATE_NOOP("USB", "Left Button"), InputBindingInfo::Type::Button, INPUT_BUTTON_LEFT, GenericInputBinding::Unknown},
|
||||||
{"RightButton", "Right Button", InputBindingInfo::Type::Button, INPUT_BUTTON_RIGHT, GenericInputBinding::Unknown},
|
{"RightButton", TRANSLATE_NOOP("USB", "Right Button"), InputBindingInfo::Type::Button, INPUT_BUTTON_RIGHT, GenericInputBinding::Unknown},
|
||||||
{"MiddleButton", "Middle Button", InputBindingInfo::Type::Button, INPUT_BUTTON_MIDDLE, GenericInputBinding::Unknown},
|
{"MiddleButton", TRANSLATE_NOOP("USB", "Middle Button"), InputBindingInfo::Type::Button, INPUT_BUTTON_MIDDLE, GenericInputBinding::Unknown},
|
||||||
};
|
};
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
@ -1124,7 +1125,7 @@ namespace usb_hid
|
||||||
|
|
||||||
const char* BeatManiaDevice::Name() const
|
const char* BeatManiaDevice::Name() const
|
||||||
{
|
{
|
||||||
return "BeatMania Da Da Da!! Keyboard";
|
return TRANSLATE_NOOP("USB", "BeatMania Da Da Da!! Keyboard");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* BeatManiaDevice::TypeName() const
|
const char* BeatManiaDevice::TypeName() const
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* PCSX2 - PS2 Emulator for PCs
|
/* PCSX2 - PS2 Emulator for PCs
|
||||||
* Copyright (C) 2002-2022 PCSX2 Dev Team
|
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||||
*
|
*
|
||||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||||
|
@ -16,6 +16,7 @@
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
|
|
||||||
#include "GS/GS.h"
|
#include "GS/GS.h"
|
||||||
|
#include "Host.h"
|
||||||
#include "Input/InputManager.h"
|
#include "Input/InputManager.h"
|
||||||
#include "StateWrapper.h"
|
#include "StateWrapper.h"
|
||||||
#include "USB/USB.h"
|
#include "USB/USB.h"
|
||||||
|
@ -404,7 +405,7 @@ namespace usb_lightgun
|
||||||
|
|
||||||
const char* GunCon2Device::Name() const
|
const char* GunCon2Device::Name() const
|
||||||
{
|
{
|
||||||
return "GunCon 2";
|
return TRANSLATE_NOOP("USB", "GunCon 2");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* GunCon2Device::TypeName() const
|
const char* GunCon2Device::TypeName() const
|
||||||
|
@ -481,21 +482,21 @@ namespace usb_lightgun
|
||||||
{
|
{
|
||||||
static constexpr const InputBindingInfo bindings[] = {
|
static constexpr const InputBindingInfo bindings[] = {
|
||||||
//{"pointer", "Pointer/Aiming", InputBindingInfo::Type::Pointer, BID_POINTER_X, GenericInputBinding::Unknown},
|
//{"pointer", "Pointer/Aiming", InputBindingInfo::Type::Pointer, BID_POINTER_X, GenericInputBinding::Unknown},
|
||||||
{"Up", "D-Pad Up", InputBindingInfo::Type::Button, BID_DPAD_UP, GenericInputBinding::DPadUp},
|
{"Up", TRANSLATE_NOOP("USB", "D-Pad Up"), InputBindingInfo::Type::Button, BID_DPAD_UP, GenericInputBinding::DPadUp},
|
||||||
{"Down", "D-Pad Down", InputBindingInfo::Type::Button, BID_DPAD_DOWN, GenericInputBinding::DPadDown},
|
{"Down", TRANSLATE_NOOP("USB", "D-Pad Down"), InputBindingInfo::Type::Button, BID_DPAD_DOWN, GenericInputBinding::DPadDown},
|
||||||
{"Left", "D-Pad Left", InputBindingInfo::Type::Button, BID_DPAD_LEFT, GenericInputBinding::DPadLeft},
|
{"Left", TRANSLATE_NOOP("USB", "D-Pad Left"), InputBindingInfo::Type::Button, BID_DPAD_LEFT, GenericInputBinding::DPadLeft},
|
||||||
{"Right", "D-Pad Right", InputBindingInfo::Type::Button, BID_DPAD_RIGHT,
|
{"Right", TRANSLATE_NOOP("USB", "D-Pad Right"), InputBindingInfo::Type::Button, BID_DPAD_RIGHT,
|
||||||
GenericInputBinding::DPadRight},
|
GenericInputBinding::DPadRight},
|
||||||
{"Trigger", "Trigger", InputBindingInfo::Type::Button, BID_TRIGGER, GenericInputBinding::R2},
|
{"Trigger", TRANSLATE_NOOP("USB", "Trigger"), InputBindingInfo::Type::Button, BID_TRIGGER, GenericInputBinding::R2},
|
||||||
{"ShootOffscreen", "Shoot Offscreen", InputBindingInfo::Type::Button, BID_SHOOT_OFFSCREEN,
|
{"ShootOffscreen", TRANSLATE_NOOP("USB", "Shoot Offscreen"), InputBindingInfo::Type::Button, BID_SHOOT_OFFSCREEN,
|
||||||
GenericInputBinding::R1},
|
GenericInputBinding::R1},
|
||||||
{"Recalibrate", "Calibration Shot", InputBindingInfo::Type::Button, BID_RECALIBRATE,
|
{"Recalibrate", TRANSLATE_NOOP("USB", "Calibration Shot"), InputBindingInfo::Type::Button, BID_RECALIBRATE,
|
||||||
GenericInputBinding::Unknown},
|
GenericInputBinding::Unknown},
|
||||||
{"A", "A", InputBindingInfo::Type::Button, BID_A, GenericInputBinding::Cross},
|
{"A", TRANSLATE_NOOP("USB", "A"), InputBindingInfo::Type::Button, BID_A, GenericInputBinding::Cross},
|
||||||
{"B", "B", InputBindingInfo::Type::Button, BID_B, GenericInputBinding::Circle},
|
{"B", TRANSLATE_NOOP("USB", "B"), InputBindingInfo::Type::Button, BID_B, GenericInputBinding::Circle},
|
||||||
{"C", "C", InputBindingInfo::Type::Button, BID_C, GenericInputBinding::Triangle},
|
{"C", TRANSLATE_NOOP("USB", "C"), InputBindingInfo::Type::Button, BID_C, GenericInputBinding::Triangle},
|
||||||
{"Select", "Select", InputBindingInfo::Type::Button, BID_SELECT, GenericInputBinding::Select},
|
{"Select", TRANSLATE_NOOP("USB", "Select"), InputBindingInfo::Type::Button, BID_SELECT, GenericInputBinding::Select},
|
||||||
{"Start", "Start", InputBindingInfo::Type::Button, BID_START, GenericInputBinding::Start},
|
{"Start", TRANSLATE_NOOP("USB", "Start"), InputBindingInfo::Type::Button, BID_START, GenericInputBinding::Start},
|
||||||
};
|
};
|
||||||
|
|
||||||
return bindings;
|
return bindings;
|
||||||
|
@ -504,23 +505,28 @@ namespace usb_lightgun
|
||||||
gsl::span<const SettingInfo> GunCon2Device::Settings(u32 subtype) const
|
gsl::span<const SettingInfo> GunCon2Device::Settings(u32 subtype) const
|
||||||
{
|
{
|
||||||
static constexpr const SettingInfo info[] = {
|
static constexpr const SettingInfo info[] = {
|
||||||
{SettingInfo::Type::Boolean, "custom_config", "Manual Screen Configuration",
|
{SettingInfo::Type::Boolean, "custom_config", TRANSLATE_NOOP("USB", "Manual Screen Configuration"),
|
||||||
"Forces the use of the screen parameters below, instead of automatic parameters if available.",
|
TRANSLATE_NOOP("USB",
|
||||||
|
"Forces the use of the screen parameters below, instead of automatic parameters if available."),
|
||||||
"false"},
|
"false"},
|
||||||
{SettingInfo::Type::Float, "scale_x", "X Scale (Sensitivity)",
|
{SettingInfo::Type::Float, "scale_x", TRANSLATE_NOOP("USB", "X Scale (Sensitivity)"),
|
||||||
"Scales the position to simulate CRT curvature.", "100", "0", "200", "0.1", "%.2f%%", nullptr, nullptr,
|
"Scales the position to simulate CRT curvature.", "100", "0", "200", "0.1", "%.2f%%", nullptr, nullptr,
|
||||||
1.0f},
|
1.0f},
|
||||||
{SettingInfo::Type::Float, "scale_y", "Y Scale (Sensitivity)",
|
{SettingInfo::Type::Float, "scale_y", TRANSLATE_NOOP("USB", "Y Scale (Sensitivity)"),
|
||||||
"Scales the position to simulate CRT curvature.", "100", "0", "200", "0.1", "%.2f%%", nullptr, nullptr,
|
"Scales the position to simulate CRT curvature.", "100", "0", "200", "0.1", "%.2f%%", nullptr, nullptr,
|
||||||
1.0f},
|
1.0f},
|
||||||
{SettingInfo::Type::Float, "center_x", "Center X", "Sets the horizontal center position of the simulated screen.",
|
{SettingInfo::Type::Float, "center_x", TRANSLATE_NOOP("USB", "Center X"),
|
||||||
"320", "0", "1024", "1", "%.0fpx", nullptr, nullptr, 1.0f},
|
TRANSLATE_NOOP("USB", "Sets the horizontal center position of the simulated screen."), "320", "0",
|
||||||
{SettingInfo::Type::Float, "center_y", "Center Y", "Sets the vertical center position of the simulated screen.",
|
"1024", "1", "%.0fpx", nullptr, nullptr, 1.0f},
|
||||||
"120", "0", "1024", "1", "%.0fpx", nullptr, nullptr, 1.0f},
|
{SettingInfo::Type::Float, "center_y", TRANSLATE_NOOP("USB", "Center Y"),
|
||||||
{SettingInfo::Type::Integer, "screen_width", "Screen Width", "Sets the width of the simulated screen.",
|
TRANSLATE_NOOP("USB", "Sets the vertical center position of the simulated screen."), "120", "0", "1024",
|
||||||
"640", "1", "1024", "1", "%dpx", nullptr, nullptr, 1.0f},
|
"1", "%.0fpx", nullptr, nullptr, 1.0f},
|
||||||
{SettingInfo::Type::Integer, "screen_height", "Screen Height", "Sets the height of the simulated screen.",
|
{SettingInfo::Type::Integer, "screen_width", TRANSLATE_NOOP("USB", "Screen Width"),
|
||||||
"240", "1", "1024", "1", "%dpx", nullptr, nullptr, 1.0f},
|
TRANSLATE_NOOP("USB", "Sets the width of the simulated screen."), "640", "1", "1024", "1", "%dpx",
|
||||||
|
nullptr, nullptr, 1.0f},
|
||||||
|
{SettingInfo::Type::Integer, "screen_height", TRANSLATE_NOOP("USB", "Screen Height"),
|
||||||
|
TRANSLATE_NOOP("USB", "Sets the height of the simulated screen."), "240", "1", "1024", "1", "%dpx",
|
||||||
|
nullptr, nullptr, 1.0f},
|
||||||
};
|
};
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
// Most stuff is based on Qemu 1.7 USB soundcard passthrough code.
|
// Most stuff is based on Qemu 1.7 USB soundcard passthrough code.
|
||||||
|
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
|
#include "Host.h"
|
||||||
#include "USB/qemu-usb/qusb.h"
|
#include "USB/qemu-usb/qusb.h"
|
||||||
#include "USB/qemu-usb/desc.h"
|
#include "USB/qemu-usb/desc.h"
|
||||||
#include "USB/qemu-usb/USBinternal.h"
|
#include "USB/qemu-usb/USBinternal.h"
|
||||||
|
@ -957,7 +958,7 @@ namespace usb_mic
|
||||||
|
|
||||||
const char* HeadsetDevice::Name() const
|
const char* HeadsetDevice::Name() const
|
||||||
{
|
{
|
||||||
return "Logitech USB Headset";
|
return TRANSLATE_NOOP("USB", "Logitech USB Headset");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool HeadsetDevice::Freeze(USBDevice* dev, StateWrapper& sw) const
|
bool HeadsetDevice::Freeze(USBDevice* dev, StateWrapper& sw) const
|
||||||
|
@ -996,14 +997,18 @@ namespace usb_mic
|
||||||
gsl::span<const SettingInfo> HeadsetDevice::Settings(u32 subtype) const
|
gsl::span<const SettingInfo> HeadsetDevice::Settings(u32 subtype) const
|
||||||
{
|
{
|
||||||
static constexpr const SettingInfo info[] = {
|
static constexpr const SettingInfo info[] = {
|
||||||
{SettingInfo::Type::StringList, "input_device_name", "Input Device", "Selects the device to read audio from.", "", nullptr,
|
{SettingInfo::Type::StringList, "input_device_name", TRANSLATE_NOOP("USB", "Input Device"),
|
||||||
nullptr, nullptr, nullptr, nullptr, &AudioDevice::GetInputDeviceList},
|
TRANSLATE_NOOP("USB", "Selects the device to read audio from."), "", nullptr, nullptr, nullptr, nullptr,
|
||||||
{SettingInfo::Type::StringList, "output_device_name", "Output Device", "Selects the device to output audio to.", "", nullptr,
|
nullptr, &AudioDevice::GetInputDeviceList},
|
||||||
nullptr, nullptr, nullptr, nullptr, &AudioDevice::GetOutputDeviceList},
|
{SettingInfo::Type::StringList, "output_device_name", TRANSLATE_NOOP("USB", "Output Device"),
|
||||||
{SettingInfo::Type::Integer, "input_latency", "Input Latency", "Specifies the latency to the host input device.", AudioDevice::DEFAULT_LATENCY_STR, "1",
|
TRANSLATE_NOOP("USB", "Selects the device to output audio to."), "", nullptr, nullptr, nullptr, nullptr,
|
||||||
"1000", "1", "%dms", nullptr, nullptr, 1.0f},
|
nullptr, &AudioDevice::GetOutputDeviceList},
|
||||||
{SettingInfo::Type::Integer, "output_latency", "Output Latency", "Specifies the latency to the host output device.", AudioDevice::DEFAULT_LATENCY_STR, "1",
|
{SettingInfo::Type::Integer, "input_latency", TRANSLATE_NOOP("USB", "Input Latency"),
|
||||||
"1000", "1", "%dms", nullptr, nullptr, 1.0f},
|
TRANSLATE_NOOP("USB", "Specifies the latency to the host input device."),
|
||||||
|
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", "%dms", nullptr, nullptr, 1.0f},
|
||||||
|
{SettingInfo::Type::Integer, "output_latency", TRANSLATE_NOOP("USB", "Output Latency"),
|
||||||
|
TRANSLATE_NOOP("USB", "Specifies the latency to the host output device."),
|
||||||
|
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", "%dms", nullptr, nullptr, 1.0f},
|
||||||
};
|
};
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
|
@ -747,7 +747,8 @@ namespace usb_mic
|
||||||
|
|
||||||
if (!s->audsrc[0] && !s->audsrc[1])
|
if (!s->audsrc[0] && !s->audsrc[1])
|
||||||
{
|
{
|
||||||
Host::AddOSDMessage("USB-Mic: Neither player 1 nor 2 is connected.", Host::OSD_ERROR_DURATION);
|
Host::AddOSDMessage(
|
||||||
|
TRANSLATE_STR("USB", "USB-Mic: Neither player 1 nor 2 is connected."), Host::OSD_ERROR_DURATION);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -763,7 +764,9 @@ namespace usb_mic
|
||||||
s->buffer[i].resize(BUFFER_FRAMES * s->audsrc[i]->GetChannels());
|
s->buffer[i].resize(BUFFER_FRAMES * s->audsrc[i]->GetChannels());
|
||||||
if (!s->audsrc[i]->Start())
|
if (!s->audsrc[i]->Start())
|
||||||
{
|
{
|
||||||
Host::AddOSDMessage(fmt::format("USB-Mic: Failed to start player {} audio stream.", i + 1), Host::OSD_ERROR_DURATION);
|
Host::AddOSDMessage(
|
||||||
|
fmt::format(TRANSLATE_SV("USB", "USB-Mic: Failed to start player {} audio stream."), i + 1),
|
||||||
|
Host::OSD_ERROR_DURATION);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -805,7 +808,7 @@ namespace usb_mic
|
||||||
|
|
||||||
const char* SingstarDevice::Name() const
|
const char* SingstarDevice::Name() const
|
||||||
{
|
{
|
||||||
return "Singstar";
|
return TRANSLATE_NOOP("USB", "Singstar");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SingstarDevice::TypeName() const
|
const char* SingstarDevice::TypeName() const
|
||||||
|
@ -846,11 +849,14 @@ namespace usb_mic
|
||||||
gsl::span<const SettingInfo> SingstarDevice::Settings(u32 subtype) const
|
gsl::span<const SettingInfo> SingstarDevice::Settings(u32 subtype) const
|
||||||
{
|
{
|
||||||
static constexpr const SettingInfo info[] = {
|
static constexpr const SettingInfo info[] = {
|
||||||
{SettingInfo::Type::StringList, "player1_device_name", "Player 1 Device", "Selects the input for the first player.", "",
|
{SettingInfo::Type::StringList, "player1_device_name", TRANSLATE_NOOP("USB", "Player 1 Device"),
|
||||||
nullptr, nullptr, nullptr, nullptr, nullptr, &AudioDevice::GetInputDeviceList},
|
TRANSLATE_NOOP("USB", "Selects the input for the first player."), "", nullptr, nullptr, nullptr,
|
||||||
{SettingInfo::Type::StringList, "player2_device_name", "Player 2 Device", "Selects the input for the second player.", "",
|
nullptr, nullptr, &AudioDevice::GetInputDeviceList},
|
||||||
nullptr, nullptr, nullptr, nullptr, nullptr, &AudioDevice::GetInputDeviceList},
|
{SettingInfo::Type::StringList, "player2_device_name", TRANSLATE_NOOP("USB", "Player 2 Device"),
|
||||||
{SettingInfo::Type::Integer, "input_latency", "Input Latency", "Specifies the latency to the host input device.",
|
TRANSLATE_NOOP("USB", "Selects the input for the second player."), "", nullptr, nullptr, nullptr,
|
||||||
|
nullptr, nullptr, &AudioDevice::GetInputDeviceList},
|
||||||
|
{SettingInfo::Type::Integer, "input_latency", TRANSLATE_NOOP("USB", "Input Latency"),
|
||||||
|
TRANSLATE_NOOP("USB", "Specifies the latency to the host input device."),
|
||||||
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", "%dms", nullptr, nullptr, 1.0f},
|
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", "%dms", nullptr, nullptr, 1.0f},
|
||||||
};
|
};
|
||||||
return info;
|
return info;
|
||||||
|
@ -863,15 +869,17 @@ namespace usb_mic
|
||||||
|
|
||||||
const char* LogitechMicDevice::Name() const
|
const char* LogitechMicDevice::Name() const
|
||||||
{
|
{
|
||||||
return "Logitech USB Mic";
|
return TRANSLATE_NOOP("USB", "Logitech USB Mic");
|
||||||
}
|
}
|
||||||
|
|
||||||
gsl::span<const SettingInfo> LogitechMicDevice::Settings(u32 subtype) const
|
gsl::span<const SettingInfo> LogitechMicDevice::Settings(u32 subtype) const
|
||||||
{
|
{
|
||||||
static constexpr const SettingInfo info[] = {
|
static constexpr const SettingInfo info[] = {
|
||||||
{SettingInfo::Type::StringList, "input_device_name", "Input Device", "Selects the device to read audio from.", "", nullptr,
|
{SettingInfo::Type::StringList, "input_device_name", TRANSLATE_NOOP("USB", "Input Device"),
|
||||||
nullptr, nullptr, nullptr, nullptr, &AudioDevice::GetInputDeviceList},
|
TRANSLATE_NOOP("USB", "Selects the device to read audio from."), "", nullptr, nullptr, nullptr, nullptr,
|
||||||
{SettingInfo::Type::Integer, "input_latency", "Input Latency", "Specifies the latency to the host input device.",
|
nullptr, &AudioDevice::GetInputDeviceList},
|
||||||
|
{SettingInfo::Type::Integer, "input_latency", TRANSLATE_NOOP("USB", "Input Latency"),
|
||||||
|
TRANSLATE_NOOP("USB", "Specifies the latency to the host input device."),
|
||||||
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", "%dms", nullptr, nullptr, 1.0f},
|
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", "%dms", nullptr, nullptr, 1.0f},
|
||||||
};
|
};
|
||||||
return info;
|
return info;
|
||||||
|
|
|
@ -971,7 +971,8 @@ namespace usb_msd
|
||||||
std::string path(USB::GetConfigString(si, port, TypeName(), "ImagePath"));
|
std::string path(USB::GetConfigString(si, port, TypeName(), "ImagePath"));
|
||||||
if (path.empty() || !(s->file = FileSystem::OpenCFile(path.c_str(), "r+b")))
|
if (path.empty() || !(s->file = FileSystem::OpenCFile(path.c_str(), "r+b")))
|
||||||
{
|
{
|
||||||
Host::AddOSDMessage(fmt::format("usb-msd: Could not open image file '{}'", path), Host::OSD_ERROR_DURATION);
|
Host::AddOSDMessage(fmt::format(TRANSLATE_SV("USB", "usb-msd: Could not open image file '{}'"), path),
|
||||||
|
Host::OSD_ERROR_DURATION);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1018,7 +1019,7 @@ namespace usb_msd
|
||||||
|
|
||||||
const char* MsdDevice::Name() const
|
const char* MsdDevice::Name() const
|
||||||
{
|
{
|
||||||
return "Mass Storage Device";
|
return TRANSLATE_NOOP("USB", "Mass Storage Device");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MsdDevice::Freeze(USBDevice* dev, StateWrapper& sw) const
|
bool MsdDevice::Freeze(USBDevice* dev, StateWrapper& sw) const
|
||||||
|
@ -1038,7 +1039,8 @@ namespace usb_msd
|
||||||
// resetting port to try to avoid possible data corruption
|
// resetting port to try to avoid possible data corruption
|
||||||
if (sw.IsReading() && old_mtime != s->f.mtime)
|
if (sw.IsReading() && old_mtime != s->f.mtime)
|
||||||
{
|
{
|
||||||
Host::AddOSDMessage("Modification time to USB mass storage image changed, reattaching.",
|
Host::AddOSDMessage(
|
||||||
|
TRANSLATE_STR("USB", "Modification time to USB mass storage image changed, reattaching."),
|
||||||
Host::OSD_ERROR_DURATION);
|
Host::OSD_ERROR_DURATION);
|
||||||
usb_reattach(dev->port);
|
usb_reattach(dev->port);
|
||||||
}
|
}
|
||||||
|
@ -1054,7 +1056,8 @@ namespace usb_msd
|
||||||
gsl::span<const SettingInfo> MsdDevice::Settings(u32 subtype) const
|
gsl::span<const SettingInfo> MsdDevice::Settings(u32 subtype) const
|
||||||
{
|
{
|
||||||
static constexpr const SettingInfo settings[] = {
|
static constexpr const SettingInfo settings[] = {
|
||||||
{SettingInfo::Type::Path, "ImagePath", "Image Path", "Sets the path to image which will back the virtual mass storage device."},
|
{SettingInfo::Type::Path, "ImagePath", TRANSLATE_NOOP("USB", "Image Path"),
|
||||||
|
TRANSLATE_NOOP("USB", "Sets the path to image which will back the virtual mass storage device.")},
|
||||||
};
|
};
|
||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* PCSX2 - PS2 Emulator for PCs
|
/* PCSX2 - PS2 Emulator for PCs
|
||||||
* Copyright (C) 2002-2020 PCSX2 Dev Team
|
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||||
*
|
*
|
||||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
#include "usb-pad.h"
|
#include "usb-pad.h"
|
||||||
#include "USB/qemu-usb/USBinternal.h"
|
#include "USB/qemu-usb/USBinternal.h"
|
||||||
#include "USB/USB.h"
|
#include "USB/USB.h"
|
||||||
|
#include "Host.h"
|
||||||
#include "StateWrapper.h"
|
#include "StateWrapper.h"
|
||||||
|
|
||||||
#ifdef SDL_BUILD
|
#ifdef SDL_BUILD
|
||||||
|
@ -88,25 +89,25 @@ namespace usb_pad
|
||||||
case WT_GENERIC:
|
case WT_GENERIC:
|
||||||
{
|
{
|
||||||
static constexpr const InputBindingInfo bindings[] = {
|
static constexpr const InputBindingInfo bindings[] = {
|
||||||
{"SteeringLeft", "Steering Left", InputBindingInfo::Type::HalfAxis, CID_STEERING_L, GenericInputBinding::LeftStickLeft},
|
{"SteeringLeft", TRANSLATE_NOOP("USB", "Steering Left"), InputBindingInfo::Type::HalfAxis, CID_STEERING_L, GenericInputBinding::LeftStickLeft},
|
||||||
{"SteeringRight", "Steering Right", InputBindingInfo::Type::HalfAxis, CID_STEERING_R, GenericInputBinding::LeftStickRight},
|
{"SteeringRight", TRANSLATE_NOOP("USB", "Steering Right"), InputBindingInfo::Type::HalfAxis, CID_STEERING_R, GenericInputBinding::LeftStickRight},
|
||||||
{"Throttle", "Throttle", InputBindingInfo::Type::HalfAxis, CID_THROTTLE, GenericInputBinding::R2},
|
{"Throttle", TRANSLATE_NOOP("USB", "Throttle"), InputBindingInfo::Type::HalfAxis, CID_THROTTLE, GenericInputBinding::R2},
|
||||||
{"Brake", "Brake", InputBindingInfo::Type::HalfAxis, CID_BRAKE, GenericInputBinding::L2},
|
{"Brake", TRANSLATE_NOOP("USB", "Brake"), InputBindingInfo::Type::HalfAxis, CID_BRAKE, GenericInputBinding::L2},
|
||||||
{"DPadUp", "D-Pad Up", InputBindingInfo::Type::Button, CID_DPAD_UP, GenericInputBinding::DPadUp},
|
{"DPadUp", TRANSLATE_NOOP("USB", "D-Pad Up"), InputBindingInfo::Type::Button, CID_DPAD_UP, GenericInputBinding::DPadUp},
|
||||||
{"DPadDown", "D-Pad Down", InputBindingInfo::Type::Button, CID_DPAD_DOWN, GenericInputBinding::DPadDown},
|
{"DPadDown", TRANSLATE_NOOP("USB", "D-Pad Down"), InputBindingInfo::Type::Button, CID_DPAD_DOWN, GenericInputBinding::DPadDown},
|
||||||
{"DPadLeft", "D-Pad Left", InputBindingInfo::Type::Button, CID_DPAD_LEFT, GenericInputBinding::DPadLeft},
|
{"DPadLeft", TRANSLATE_NOOP("USB", "D-Pad Left"), InputBindingInfo::Type::Button, CID_DPAD_LEFT, GenericInputBinding::DPadLeft},
|
||||||
{"DPadRight", "D-Pad Right", InputBindingInfo::Type::Button, CID_DPAD_RIGHT, GenericInputBinding::DPadRight},
|
{"DPadRight", TRANSLATE_NOOP("USB", "D-Pad Right"), InputBindingInfo::Type::Button, CID_DPAD_RIGHT, GenericInputBinding::DPadRight},
|
||||||
{"Cross", "Cross", InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::Cross},
|
{"Cross", TRANSLATE_NOOP("USB", "Cross"), InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::Cross},
|
||||||
{"Square", "Square", InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::Square},
|
{"Square", TRANSLATE_NOOP("USB", "Square"), InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::Square},
|
||||||
{"Circle", "Circle", InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::Circle},
|
{"Circle", TRANSLATE_NOOP("USB", "Circle"), InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::Circle},
|
||||||
{"Triangle", "Triangle", InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Triangle},
|
{"Triangle", TRANSLATE_NOOP("USB", "Triangle"), InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Triangle},
|
||||||
{"L1", "L1", InputBindingInfo::Type::Button, CID_BUTTON5, GenericInputBinding::L1},
|
{"L1", TRANSLATE_NOOP("USB", "L1"), InputBindingInfo::Type::Button, CID_BUTTON5, GenericInputBinding::L1},
|
||||||
{"R1", "R1", InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::R1},
|
{"R1", TRANSLATE_NOOP("USB", "R1"), InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::R1},
|
||||||
{"L2", "L2", InputBindingInfo::Type::Button, CID_BUTTON7, GenericInputBinding::Unknown}, // used L2 for brake
|
{"L2", TRANSLATE_NOOP("USB", "L2"), InputBindingInfo::Type::Button, CID_BUTTON7, GenericInputBinding::Unknown}, // used L2 for brake
|
||||||
{"R2", "R2", InputBindingInfo::Type::Button, CID_BUTTON6, GenericInputBinding::Unknown}, // used R2 for throttle
|
{"R2", TRANSLATE_NOOP("USB", "R2"), InputBindingInfo::Type::Button, CID_BUTTON6, GenericInputBinding::Unknown}, // used R2 for throttle
|
||||||
{"Select", "Select", InputBindingInfo::Type::Button, CID_BUTTON8, GenericInputBinding::Select},
|
{"Select", TRANSLATE_NOOP("USB", "Select"), InputBindingInfo::Type::Button, CID_BUTTON8, GenericInputBinding::Select},
|
||||||
{"Start", "Start", InputBindingInfo::Type::Button, CID_BUTTON9, GenericInputBinding::Start},
|
{"Start", TRANSLATE_NOOP("USB", "Start"), InputBindingInfo::Type::Button, CID_BUTTON9, GenericInputBinding::Start},
|
||||||
{"FFDevice", "Force Feedback", InputBindingInfo::Type::Device, 0, GenericInputBinding::Unknown},
|
{"FFDevice", TRANSLATE_NOOP("USB", "Force Feedback"), InputBindingInfo::Type::Device, 0, GenericInputBinding::Unknown},
|
||||||
};
|
};
|
||||||
|
|
||||||
return bindings;
|
return bindings;
|
||||||
|
@ -116,26 +117,26 @@ namespace usb_pad
|
||||||
case WT_DRIVING_FORCE_PRO_1102:
|
case WT_DRIVING_FORCE_PRO_1102:
|
||||||
{
|
{
|
||||||
static constexpr const InputBindingInfo bindings[] = {
|
static constexpr const InputBindingInfo bindings[] = {
|
||||||
{"SteeringLeft", "Steering Left", InputBindingInfo::Type::HalfAxis, CID_STEERING_L, GenericInputBinding::LeftStickLeft},
|
{"SteeringLeft", TRANSLATE_NOOP("USB", "Steering Left"), InputBindingInfo::Type::HalfAxis, CID_STEERING_L, GenericInputBinding::LeftStickLeft},
|
||||||
{"SteeringRight", "Steering Right", InputBindingInfo::Type::HalfAxis, CID_STEERING_R, GenericInputBinding::LeftStickRight},
|
{"SteeringRight", TRANSLATE_NOOP("USB", "Steering Right"), InputBindingInfo::Type::HalfAxis, CID_STEERING_R, GenericInputBinding::LeftStickRight},
|
||||||
{"Throttle", "Throttle", InputBindingInfo::Type::HalfAxis, CID_THROTTLE, GenericInputBinding::R2},
|
{"Throttle", TRANSLATE_NOOP("USB", "Throttle"), InputBindingInfo::Type::HalfAxis, CID_THROTTLE, GenericInputBinding::R2},
|
||||||
{"Brake", "Brake", InputBindingInfo::Type::HalfAxis, CID_BRAKE, GenericInputBinding::L2},
|
{"Brake", TRANSLATE_NOOP("USB", "Brake"), InputBindingInfo::Type::HalfAxis, CID_BRAKE, GenericInputBinding::L2},
|
||||||
{"DPadUp", "D-Pad Up", InputBindingInfo::Type::Button, CID_DPAD_UP, GenericInputBinding::DPadUp},
|
{"DPadUp", TRANSLATE_NOOP("USB", "D-Pad Up"), InputBindingInfo::Type::Button, CID_DPAD_UP, GenericInputBinding::DPadUp},
|
||||||
{"DPadDown", "D-Pad Down", InputBindingInfo::Type::Button, CID_DPAD_DOWN, GenericInputBinding::DPadDown},
|
{"DPadDown", TRANSLATE_NOOP("USB", "D-Pad Down"), InputBindingInfo::Type::Button, CID_DPAD_DOWN, GenericInputBinding::DPadDown},
|
||||||
{"DPadLeft", "D-Pad Left", InputBindingInfo::Type::Button, CID_DPAD_LEFT, GenericInputBinding::DPadLeft},
|
{"DPadLeft", TRANSLATE_NOOP("USB", "D-Pad Left"), InputBindingInfo::Type::Button, CID_DPAD_LEFT, GenericInputBinding::DPadLeft},
|
||||||
{"DPadRight", "D-Pad Right", InputBindingInfo::Type::Button, CID_DPAD_RIGHT, GenericInputBinding::DPadRight},
|
{"DPadRight", TRANSLATE_NOOP("USB", "D-Pad Right"), InputBindingInfo::Type::Button, CID_DPAD_RIGHT, GenericInputBinding::DPadRight},
|
||||||
{"Cross", "Cross", InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::Cross},
|
{"Cross", TRANSLATE_NOOP("USB", "Cross"), InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::Cross},
|
||||||
{"Square", "Square", InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::Square},
|
{"Square", TRANSLATE_NOOP("USB", "Square"), InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::Square},
|
||||||
{"Circle", "Circle", InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::Circle},
|
{"Circle", TRANSLATE_NOOP("USB", "Circle"), InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::Circle},
|
||||||
{"Triangle", "Triangle", InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Triangle},
|
{"Triangle", TRANSLATE_NOOP("USB", "Triangle"), InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Triangle},
|
||||||
{"R1", "Shift Up / R1", InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::R1},
|
{"R1", TRANSLATE_NOOP("USB", "Shift Up / R1"), InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::R1},
|
||||||
{"L1", "Shift Down / L1", InputBindingInfo::Type::Button, CID_BUTTON5, GenericInputBinding::L1},
|
{"L1", TRANSLATE_NOOP("USB", "Shift Down / L1"), InputBindingInfo::Type::Button, CID_BUTTON5, GenericInputBinding::L1},
|
||||||
{"Select", "Select", InputBindingInfo::Type::Button, CID_BUTTON8, GenericInputBinding::Select},
|
{"Select", TRANSLATE_NOOP("USB", "Select"), InputBindingInfo::Type::Button, CID_BUTTON8, GenericInputBinding::Select},
|
||||||
{"Start", "Start", InputBindingInfo::Type::Button, CID_BUTTON9, GenericInputBinding::Start},
|
{"Start", TRANSLATE_NOOP("USB", "Start"), InputBindingInfo::Type::Button, CID_BUTTON9, GenericInputBinding::Start},
|
||||||
{"L2", "L2", InputBindingInfo::Type::Button, CID_BUTTON7, GenericInputBinding::Unknown}, // used L2 for brake
|
{"L2", TRANSLATE_NOOP("USB", "L2"), InputBindingInfo::Type::Button, CID_BUTTON7, GenericInputBinding::Unknown}, // used L2 for brake
|
||||||
{"R2", "R2", InputBindingInfo::Type::Button, CID_BUTTON6, GenericInputBinding::Unknown}, // used R2 for throttle
|
{"R2", TRANSLATE_NOOP("USB", "R2"), InputBindingInfo::Type::Button, CID_BUTTON6, GenericInputBinding::Unknown}, // used R2 for throttle
|
||||||
{"L3", "L3", InputBindingInfo::Type::Button, CID_BUTTON11, GenericInputBinding::L3},
|
{"L3", TRANSLATE_NOOP("USB", "L3"), InputBindingInfo::Type::Button, CID_BUTTON11, GenericInputBinding::L3},
|
||||||
{"R3", "R3", InputBindingInfo::Type::Button, CID_BUTTON10, GenericInputBinding::R3},
|
{"R3", TRANSLATE_NOOP("USB", "R3"), InputBindingInfo::Type::Button, CID_BUTTON10, GenericInputBinding::R3},
|
||||||
{"FFDevice", "Force Feedback", InputBindingInfo::Type::Device, 0, GenericInputBinding::Unknown},
|
{"FFDevice", "Force Feedback", InputBindingInfo::Type::Device, 0, GenericInputBinding::Unknown},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -145,17 +146,17 @@ namespace usb_pad
|
||||||
case WT_GT_FORCE:
|
case WT_GT_FORCE:
|
||||||
{
|
{
|
||||||
static constexpr const InputBindingInfo bindings[] = {
|
static constexpr const InputBindingInfo bindings[] = {
|
||||||
{"SteeringLeft", "Steering Left", InputBindingInfo::Type::HalfAxis, CID_STEERING_L, GenericInputBinding::LeftStickLeft},
|
{"SteeringLeft", TRANSLATE_NOOP("USB", "Steering Left"), InputBindingInfo::Type::HalfAxis, CID_STEERING_L, GenericInputBinding::LeftStickLeft},
|
||||||
{"SteeringRight", "Steering Right", InputBindingInfo::Type::HalfAxis, CID_STEERING_R, GenericInputBinding::LeftStickRight},
|
{"SteeringRight", TRANSLATE_NOOP("USB", "Steering Right"), InputBindingInfo::Type::HalfAxis, CID_STEERING_R, GenericInputBinding::LeftStickRight},
|
||||||
{"Throttle", "Throttle", InputBindingInfo::Type::HalfAxis, CID_THROTTLE, GenericInputBinding::R2},
|
{"Throttle", TRANSLATE_NOOP("USB", "Throttle"), InputBindingInfo::Type::HalfAxis, CID_THROTTLE, GenericInputBinding::R2},
|
||||||
{"Brake", "Brake", InputBindingInfo::Type::HalfAxis, CID_BRAKE, GenericInputBinding::L2},
|
{"Brake", TRANSLATE_NOOP("USB", "Brake"), InputBindingInfo::Type::HalfAxis, CID_BRAKE, GenericInputBinding::L2},
|
||||||
{"MenuUp", "Menu Up", InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::DPadUp},
|
{"MenuUp", TRANSLATE_NOOP("USB", "Menu Up"), InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::DPadUp},
|
||||||
{"MenuDown", "Menu Down", InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::DPadDown},
|
{"MenuDown", TRANSLATE_NOOP("USB", "Menu Down"), InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::DPadDown},
|
||||||
{"X", "X", InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::Square},
|
{"X", TRANSLATE_NOOP("USB", "X"), InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::Square},
|
||||||
{"Y", "Y", InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Triangle},
|
{"Y", TRANSLATE_NOOP("USB", "Y"), InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Triangle},
|
||||||
{"A", "A", InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::Cross},
|
{"A", TRANSLATE_NOOP("USB", "A"), InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::Cross},
|
||||||
{"B", "B", InputBindingInfo::Type::Button, CID_BUTTON5, GenericInputBinding::Circle},
|
{"B", TRANSLATE_NOOP("USB", "B"), InputBindingInfo::Type::Button, CID_BUTTON5, GenericInputBinding::Circle},
|
||||||
{"FFDevice", "Force Feedback", InputBindingInfo::Type::Device, 0, GenericInputBinding::Unknown},
|
{"FFDevice", TRANSLATE_NOOP("USB", "Force Feedback"), InputBindingInfo::Type::Device, 0, GenericInputBinding::Unknown},
|
||||||
};
|
};
|
||||||
|
|
||||||
return bindings;
|
return bindings;
|
||||||
|
@ -174,14 +175,14 @@ namespace usb_pad
|
||||||
{
|
{
|
||||||
static constexpr const char* SteeringCurveExponentOptions[] = {"Off", "Low", "Medium", "High", nullptr};
|
static constexpr const char* SteeringCurveExponentOptions[] = {"Off", "Low", "Medium", "High", nullptr};
|
||||||
static constexpr const SettingInfo info[] = {
|
static constexpr const SettingInfo info[] = {
|
||||||
{SettingInfo::Type::Integer, "SteeringSmoothing", "Steering Smoothing",
|
{SettingInfo::Type::Integer, "SteeringSmoothing", TRANSLATE_NOOP("USB", "Steering Smoothing"),
|
||||||
"Smooths out changes in steering to the specified percentage per poll. Needed for using keyboards.",
|
TRANSLATE_NOOP("USB", "Smooths out changes in steering to the specified percentage per poll. Needed for using keyboards."),
|
||||||
"0", "0", "100", "1", "%d%%", nullptr, nullptr, 1.0f},
|
"0", "0", "100", "1", "%d%%", nullptr, nullptr, 1.0f},
|
||||||
{SettingInfo::Type::Integer, "SteeringDeadzone", "Steering Deadzone",
|
{SettingInfo::Type::Integer, "SteeringDeadzone", TRANSLATE_NOOP("USB", "Steering Deadzone"),
|
||||||
"Steering axis deadzone for pads or non self centering wheels.",
|
TRANSLATE_NOOP("USB", "Steering axis deadzone for pads or non self centering wheels."),
|
||||||
"0", "0", "100", "1", "%d%%", nullptr, nullptr, 1.0f},
|
"0", "0", "100", "1", "%d%%", nullptr, nullptr, 1.0f},
|
||||||
{SettingInfo::Type::StringList, "SteeringCurveExponent", "Steering Damping",
|
{SettingInfo::Type::StringList, "SteeringCurveExponent", TRANSLATE_NOOP("USB", "Steering Damping"),
|
||||||
"Applies power curve filter to steering axis values. Dampens small inputs.",
|
TRANSLATE_NOOP("USB", "Applies power curve filter to steering axis values. Dampens small inputs."),
|
||||||
"Off", nullptr, nullptr, nullptr, nullptr, SteeringCurveExponentOptions}
|
"Off", nullptr, nullptr, nullptr, nullptr, SteeringCurveExponentOptions}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -836,7 +837,7 @@ namespace usb_pad
|
||||||
|
|
||||||
const char* PadDevice::Name() const
|
const char* PadDevice::Name() const
|
||||||
{
|
{
|
||||||
return "Wheel Device";
|
return TRANSLATE_NOOP("USB", "Wheel Device");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* PadDevice::TypeName() const
|
const char* PadDevice::TypeName() const
|
||||||
|
@ -875,7 +876,9 @@ namespace usb_pad
|
||||||
|
|
||||||
gsl::span<const char*> PadDevice::SubTypes() const
|
gsl::span<const char*> PadDevice::SubTypes() const
|
||||||
{
|
{
|
||||||
static const char* subtypes[] = {"Driving Force", "Driving Force Pro", "Driving Force Pro (rev11.02)", "GT Force"};
|
static const char* subtypes[] = {TRANSLATE_NOOP("USB", "Driving Force"),
|
||||||
|
TRANSLATE_NOOP("USB", "Driving Force Pro"), TRANSLATE_NOOP("USB", "Driving Force Pro (rev11.02)"),
|
||||||
|
TRANSLATE_NOOP("USB", "GT Force")};
|
||||||
return subtypes;
|
return subtypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -907,7 +910,7 @@ namespace usb_pad
|
||||||
|
|
||||||
const char* RBDrumKitDevice::Name() const
|
const char* RBDrumKitDevice::Name() const
|
||||||
{
|
{
|
||||||
return "Rock Band Drum Kit";
|
return TRANSLATE_NOOP("USB", "Rock Band Drum Kit");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* RBDrumKitDevice::TypeName() const
|
const char* RBDrumKitDevice::TypeName() const
|
||||||
|
@ -944,13 +947,13 @@ namespace usb_pad
|
||||||
gsl::span<const InputBindingInfo> RBDrumKitDevice::Bindings(u32 subtype) const
|
gsl::span<const InputBindingInfo> RBDrumKitDevice::Bindings(u32 subtype) const
|
||||||
{
|
{
|
||||||
static constexpr const InputBindingInfo bindings[] = {
|
static constexpr const InputBindingInfo bindings[] = {
|
||||||
{"Blue", "Blue", InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::R1},
|
{"Blue", TRANSLATE_NOOP("USB", "Blue"), InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::R1},
|
||||||
{"Green", "Green", InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::Triangle},
|
{"Green", TRANSLATE_NOOP("USB", "Green"), InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::Triangle},
|
||||||
{"Red", "Red", InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::Circle},
|
{"Red", TRANSLATE_NOOP("USB", "Red"), InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::Circle},
|
||||||
{"Yellow", "Yellow", InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Square},
|
{"Yellow", TRANSLATE_NOOP("USB", "Yellow"), InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Square},
|
||||||
{"Orange", "Orange", InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::Cross},
|
{"Orange", TRANSLATE_NOOP("USB", "Orange"), InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::Cross},
|
||||||
{"Select", "Select", InputBindingInfo::Type::Button, CID_BUTTON8, GenericInputBinding::Select},
|
{"Select", TRANSLATE_NOOP("USB", "Select"), InputBindingInfo::Type::Button, CID_BUTTON8, GenericInputBinding::Select},
|
||||||
{"Start", "Start", InputBindingInfo::Type::Button, CID_BUTTON9, GenericInputBinding::Start},
|
{"Start", TRANSLATE_NOOP("USB", "Start"), InputBindingInfo::Type::Button, CID_BUTTON9, GenericInputBinding::Start},
|
||||||
};
|
};
|
||||||
|
|
||||||
return bindings;
|
return bindings;
|
||||||
|
@ -965,7 +968,7 @@ namespace usb_pad
|
||||||
|
|
||||||
const char* BuzzDevice::Name() const
|
const char* BuzzDevice::Name() const
|
||||||
{
|
{
|
||||||
return "Buzz Controller";
|
return TRANSLATE_NOOP("USB", "Buzz Controller");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* BuzzDevice::TypeName() const
|
const char* BuzzDevice::TypeName() const
|
||||||
|
@ -981,29 +984,29 @@ namespace usb_pad
|
||||||
gsl::span<const InputBindingInfo> BuzzDevice::Bindings(u32 subtype) const
|
gsl::span<const InputBindingInfo> BuzzDevice::Bindings(u32 subtype) const
|
||||||
{
|
{
|
||||||
static constexpr const InputBindingInfo bindings[] = {
|
static constexpr const InputBindingInfo bindings[] = {
|
||||||
{"Red1", "Player 1 Red", InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::Circle},
|
{"Red1", TRANSLATE_NOOP("USB", "Player 1 Red"), InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::Circle},
|
||||||
{"Blue1", "Player 1 Blue", InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::R1},
|
{"Blue1", TRANSLATE_NOOP("USB", "Player 1 Blue"), InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::R1},
|
||||||
{"Orange1", "Player 1 Orange", InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Cross},
|
{"Orange1", TRANSLATE_NOOP("USB", "Player 1 Orange"), InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Cross},
|
||||||
{"Green1", "Player 1 Green", InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::Triangle},
|
{"Green1", TRANSLATE_NOOP("USB", "Player 1 Green"), InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::Triangle},
|
||||||
{"Yellow1", "Player 1 Yellow", InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::Square},
|
{"Yellow1", TRANSLATE_NOOP("USB", "Player 1 Yellow"), InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::Square},
|
||||||
|
|
||||||
{"Red2", "Player 2 Red", InputBindingInfo::Type::Button, CID_BUTTON5, GenericInputBinding::Unknown},
|
{"Red2", TRANSLATE_NOOP("USB", "Player 2 Red"), InputBindingInfo::Type::Button, CID_BUTTON5, GenericInputBinding::Unknown},
|
||||||
{"Blue2", "Player 2 Blue", InputBindingInfo::Type::Button, CID_BUTTON9, GenericInputBinding::Unknown},
|
{"Blue2", TRANSLATE_NOOP("USB", "Player 2 Blue"), InputBindingInfo::Type::Button, CID_BUTTON9, GenericInputBinding::Unknown},
|
||||||
{"Orange2", "Player 2 Orange", InputBindingInfo::Type::Button, CID_BUTTON8, GenericInputBinding::Unknown},
|
{"Orange2", TRANSLATE_NOOP("USB", "Player 2 Orange"), InputBindingInfo::Type::Button, CID_BUTTON8, GenericInputBinding::Unknown},
|
||||||
{"Green2", "Player 2 Green", InputBindingInfo::Type::Button, CID_BUTTON7, GenericInputBinding::Unknown},
|
{"Green2", TRANSLATE_NOOP("USB", "Player 2 Green"), InputBindingInfo::Type::Button, CID_BUTTON7, GenericInputBinding::Unknown},
|
||||||
{"Yellow2", "Player 2 Yellow", InputBindingInfo::Type::Button, CID_BUTTON6, GenericInputBinding::Unknown},
|
{"Yellow2", TRANSLATE_NOOP("USB", "Player 2 Yellow"), InputBindingInfo::Type::Button, CID_BUTTON6, GenericInputBinding::Unknown},
|
||||||
|
|
||||||
{"Red3", "Player 3 Red", InputBindingInfo::Type::Button, CID_BUTTON10, GenericInputBinding::Unknown},
|
{"Red3", TRANSLATE_NOOP("USB", "Player 3 Red"), InputBindingInfo::Type::Button, CID_BUTTON10, GenericInputBinding::Unknown},
|
||||||
{"Blue3", "Player 3 Blue", InputBindingInfo::Type::Button, CID_BUTTON14, GenericInputBinding::Unknown},
|
{"Blue3", TRANSLATE_NOOP("USB", "Player 3 Blue"), InputBindingInfo::Type::Button, CID_BUTTON14, GenericInputBinding::Unknown},
|
||||||
{"Orange3", "Player 3 Orange", InputBindingInfo::Type::Button, CID_BUTTON13, GenericInputBinding::Unknown},
|
{"Orange3", TRANSLATE_NOOP("USB", "Player 3 Orange"), InputBindingInfo::Type::Button, CID_BUTTON13, GenericInputBinding::Unknown},
|
||||||
{"Green3", "Player 3 Green", InputBindingInfo::Type::Button, CID_BUTTON12, GenericInputBinding::Unknown},
|
{"Green3", TRANSLATE_NOOP("USB", "Player 3 Green"), InputBindingInfo::Type::Button, CID_BUTTON12, GenericInputBinding::Unknown},
|
||||||
{"Yellow3", "Player 3 Yellow", InputBindingInfo::Type::Button, CID_BUTTON11, GenericInputBinding::Unknown},
|
{"Yellow3", TRANSLATE_NOOP("USB", "Player 3 Yellow"), InputBindingInfo::Type::Button, CID_BUTTON11, GenericInputBinding::Unknown},
|
||||||
|
|
||||||
{"Red4", "Player 4 Red", InputBindingInfo::Type::Button, CID_BUTTON15, GenericInputBinding::Unknown},
|
{"Red4", TRANSLATE_NOOP("USB", "Player 4 Red"), InputBindingInfo::Type::Button, CID_BUTTON15, GenericInputBinding::Unknown},
|
||||||
{"Blue4", "Player 4 Blue", InputBindingInfo::Type::Button, CID_BUTTON19, GenericInputBinding::Unknown},
|
{"Blue4", TRANSLATE_NOOP("USB", "Player 4 Blue"), InputBindingInfo::Type::Button, CID_BUTTON19, GenericInputBinding::Unknown},
|
||||||
{"Orange4", "Player 4 Orange", InputBindingInfo::Type::Button, CID_BUTTON18, GenericInputBinding::Unknown},
|
{"Orange4", TRANSLATE_NOOP("USB", "Player 4 Orange"), InputBindingInfo::Type::Button, CID_BUTTON18, GenericInputBinding::Unknown},
|
||||||
{"Green4", "Player 4 Green", InputBindingInfo::Type::Button, CID_BUTTON17, GenericInputBinding::Unknown},
|
{"Green4", TRANSLATE_NOOP("USB", "Player 4 Green"), InputBindingInfo::Type::Button, CID_BUTTON17, GenericInputBinding::Unknown},
|
||||||
{"Yellow4", "Player 4 Yellow", InputBindingInfo::Type::Button, CID_BUTTON16, GenericInputBinding::Unknown},
|
{"Yellow4", TRANSLATE_NOOP("USB", "Player 4 Yellow"), InputBindingInfo::Type::Button, CID_BUTTON16, GenericInputBinding::Unknown},
|
||||||
};
|
};
|
||||||
|
|
||||||
return bindings;
|
return bindings;
|
||||||
|
@ -1039,7 +1042,7 @@ namespace usb_pad
|
||||||
|
|
||||||
const char* KeyboardmaniaDevice::Name() const
|
const char* KeyboardmaniaDevice::Name() const
|
||||||
{
|
{
|
||||||
return "Keyboardmania";
|
return TRANSLATE_NOOP("USB", "Keyboardmania");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* KeyboardmaniaDevice::TypeName() const
|
const char* KeyboardmaniaDevice::TypeName() const
|
||||||
|
@ -1055,35 +1058,35 @@ namespace usb_pad
|
||||||
gsl::span<const InputBindingInfo> KeyboardmaniaDevice::Bindings(u32 subtype) const
|
gsl::span<const InputBindingInfo> KeyboardmaniaDevice::Bindings(u32 subtype) const
|
||||||
{
|
{
|
||||||
static constexpr const InputBindingInfo bindings[] = {
|
static constexpr const InputBindingInfo bindings[] = {
|
||||||
{"C1", "C 1", InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::Unknown},
|
{"C1", TRANSLATE_NOOP("USB", "C 1"), InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::Unknown},
|
||||||
{"CSharp1", "C# 1", InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::Unknown},
|
{"CSharp1", TRANSLATE_NOOP("USB", "C# 1"), InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::Unknown},
|
||||||
{"D1", "D 1", InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::Unknown},
|
{"D1", TRANSLATE_NOOP("USB", "D 1"), InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::Unknown},
|
||||||
{"DSharp1", "D# 1", InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Unknown},
|
{"DSharp1", TRANSLATE_NOOP("USB", "D# 1"), InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Unknown},
|
||||||
{"E1", "E 1", InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::Unknown},
|
{"E1", TRANSLATE_NOOP("USB", "E 1"), InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::Unknown},
|
||||||
{"F1", "F 1", InputBindingInfo::Type::Button, CID_BUTTON5, GenericInputBinding::Unknown},
|
{"F1", TRANSLATE_NOOP("USB", "F 1"), InputBindingInfo::Type::Button, CID_BUTTON5, GenericInputBinding::Unknown},
|
||||||
{"FSharp1", "F# 1", InputBindingInfo::Type::Button, CID_BUTTON6, GenericInputBinding::Unknown},
|
{"FSharp1", TRANSLATE_NOOP("USB", "F# 1"), InputBindingInfo::Type::Button, CID_BUTTON6, GenericInputBinding::Unknown},
|
||||||
{"G1", "G 1", InputBindingInfo::Type::Button, CID_BUTTON8, GenericInputBinding::Unknown},
|
{"G1", TRANSLATE_NOOP("USB", "G 1"), InputBindingInfo::Type::Button, CID_BUTTON8, GenericInputBinding::Unknown},
|
||||||
{"GSharp1", "G# 1", InputBindingInfo::Type::Button, CID_BUTTON9, GenericInputBinding::Unknown},
|
{"GSharp1", TRANSLATE_NOOP("USB", "G# 1"), InputBindingInfo::Type::Button, CID_BUTTON9, GenericInputBinding::Unknown},
|
||||||
{"A1", "A 1", InputBindingInfo::Type::Button, CID_BUTTON10, GenericInputBinding::Unknown},
|
{"A1", TRANSLATE_NOOP("USB", "A 1"), InputBindingInfo::Type::Button, CID_BUTTON10, GenericInputBinding::Unknown},
|
||||||
{"ASharp1", "A# 1", InputBindingInfo::Type::Button, CID_BUTTON11, GenericInputBinding::Unknown},
|
{"ASharp1", TRANSLATE_NOOP("USB", "A# 1"), InputBindingInfo::Type::Button, CID_BUTTON11, GenericInputBinding::Unknown},
|
||||||
{"B1", "B 1", InputBindingInfo::Type::Button, CID_BUTTON12, GenericInputBinding::Unknown},
|
{"B1", TRANSLATE_NOOP("USB", "B 1"), InputBindingInfo::Type::Button, CID_BUTTON12, GenericInputBinding::Unknown},
|
||||||
{"C2", "C 2", InputBindingInfo::Type::Button, CID_BUTTON13, GenericInputBinding::Unknown},
|
{"C2", TRANSLATE_NOOP("USB", "C 2"), InputBindingInfo::Type::Button, CID_BUTTON13, GenericInputBinding::Unknown},
|
||||||
{"CSharp2", "C# 2", InputBindingInfo::Type::Button, CID_BUTTON16, GenericInputBinding::Unknown},
|
{"CSharp2", TRANSLATE_NOOP("USB", "C# 2"), InputBindingInfo::Type::Button, CID_BUTTON16, GenericInputBinding::Unknown},
|
||||||
{"D2", "D 2", InputBindingInfo::Type::Button, CID_BUTTON17, GenericInputBinding::Unknown},
|
{"D2", TRANSLATE_NOOP("USB", "D 2"), InputBindingInfo::Type::Button, CID_BUTTON17, GenericInputBinding::Unknown},
|
||||||
{"DSharp2", "D# 2", InputBindingInfo::Type::Button, CID_BUTTON18, GenericInputBinding::Unknown},
|
{"DSharp2", TRANSLATE_NOOP("USB", "D# 2"), InputBindingInfo::Type::Button, CID_BUTTON18, GenericInputBinding::Unknown},
|
||||||
{"E2", "E 2", InputBindingInfo::Type::Button, CID_BUTTON19, GenericInputBinding::Unknown},
|
{"E2", TRANSLATE_NOOP("USB", "E 2"), InputBindingInfo::Type::Button, CID_BUTTON19, GenericInputBinding::Unknown},
|
||||||
{"F2", "F 2", InputBindingInfo::Type::Button, CID_BUTTON20, GenericInputBinding::Unknown},
|
{"F2", TRANSLATE_NOOP("USB", "F 2"), InputBindingInfo::Type::Button, CID_BUTTON20, GenericInputBinding::Unknown},
|
||||||
{"FSharp2", "F# 2", InputBindingInfo::Type::Button, CID_BUTTON21, GenericInputBinding::Unknown},
|
{"FSharp2", TRANSLATE_NOOP("USB", "F# 2"), InputBindingInfo::Type::Button, CID_BUTTON21, GenericInputBinding::Unknown},
|
||||||
{"G2", "G 2", InputBindingInfo::Type::Button, CID_BUTTON24, GenericInputBinding::Unknown},
|
{"G2", TRANSLATE_NOOP("USB", "G 2"), InputBindingInfo::Type::Button, CID_BUTTON24, GenericInputBinding::Unknown},
|
||||||
{"GSharp2", "G# 2", InputBindingInfo::Type::Button, CID_BUTTON25, GenericInputBinding::Unknown},
|
{"GSharp2", TRANSLATE_NOOP("USB", "G# 2"), InputBindingInfo::Type::Button, CID_BUTTON25, GenericInputBinding::Unknown},
|
||||||
{"A2", "A 2", InputBindingInfo::Type::Button, CID_BUTTON26, GenericInputBinding::Unknown},
|
{"A2", TRANSLATE_NOOP("USB", "A 2"), InputBindingInfo::Type::Button, CID_BUTTON26, GenericInputBinding::Unknown},
|
||||||
{"ASharp2", "A# 2", InputBindingInfo::Type::Button, CID_BUTTON27, GenericInputBinding::Unknown},
|
{"ASharp2", TRANSLATE_NOOP("USB", "A# 2"), InputBindingInfo::Type::Button, CID_BUTTON27, GenericInputBinding::Unknown},
|
||||||
{"B2", "B 2", InputBindingInfo::Type::Button, CID_BUTTON28, GenericInputBinding::Unknown},
|
{"B2", TRANSLATE_NOOP("USB", "B 2"), InputBindingInfo::Type::Button, CID_BUTTON28, GenericInputBinding::Unknown},
|
||||||
|
|
||||||
{"Start", "Start", InputBindingInfo::Type::Button, CID_BUTTON22, GenericInputBinding::Unknown},
|
{"Start", TRANSLATE_NOOP("USB", "Start"), InputBindingInfo::Type::Button, CID_BUTTON22, GenericInputBinding::Unknown},
|
||||||
{"Select", "Select", InputBindingInfo::Type::Button, CID_BUTTON14, GenericInputBinding::Unknown},
|
{"Select", TRANSLATE_NOOP("USB", "Select"), InputBindingInfo::Type::Button, CID_BUTTON14, GenericInputBinding::Unknown},
|
||||||
{"WheelUp", "Wheel Up", InputBindingInfo::Type::Button, CID_BUTTON29, GenericInputBinding::Unknown},
|
{"WheelUp", TRANSLATE_NOOP("USB", "Wheel Up"), InputBindingInfo::Type::Button, CID_BUTTON29, GenericInputBinding::Unknown},
|
||||||
{"WheelDown", "Wheel Down", InputBindingInfo::Type::Button, CID_BUTTON30, GenericInputBinding::Unknown},
|
{"WheelDown", TRANSLATE_NOOP("USB", "Wheel Down"), InputBindingInfo::Type::Button, CID_BUTTON30, GenericInputBinding::Unknown},
|
||||||
};
|
};
|
||||||
|
|
||||||
return bindings;
|
return bindings;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* PCSX2 - PS2 Emulator for PCs
|
/* PCSX2 - PS2 Emulator for PCs
|
||||||
* Copyright (C) 2002-2020 PCSX2 Dev Team
|
* Copyright (C) 2002-2023 PCSX2 Dev Team
|
||||||
*
|
*
|
||||||
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
|
||||||
* of the GNU Lesser General Public License as published by the Free Software Found-
|
* of the GNU Lesser General Public License as published by the Free Software Found-
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "PrecompiledHeader.h"
|
#include "PrecompiledHeader.h"
|
||||||
|
#include "Host.h"
|
||||||
#include "USB/usb-pad/usb-pad.h"
|
#include "USB/usb-pad/usb-pad.h"
|
||||||
#include "USB/qemu-usb/desc.h"
|
#include "USB/qemu-usb/desc.h"
|
||||||
#include "USB/usb-mic/usb-mic-singstar.h"
|
#include "USB/usb-mic/usb-mic-singstar.h"
|
||||||
|
@ -344,7 +345,7 @@ namespace usb_pad
|
||||||
|
|
||||||
const char* SeamicDevice::Name() const
|
const char* SeamicDevice::Name() const
|
||||||
{
|
{
|
||||||
return "Sega Seamic";
|
return TRANSLATE_NOOP("USB", "Sega Seamic");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* SeamicDevice::TypeName() const
|
const char* SeamicDevice::TypeName() const
|
||||||
|
@ -361,24 +362,24 @@ namespace usb_pad
|
||||||
{
|
{
|
||||||
// TODO: This is likely wrong. Someone who cares can fix it.
|
// TODO: This is likely wrong. Someone who cares can fix it.
|
||||||
static constexpr const InputBindingInfo bindings[] = {
|
static constexpr const InputBindingInfo bindings[] = {
|
||||||
{"StickLeft", "Stick Left", InputBindingInfo::Type::HalfAxis, CID_STEERING_L, GenericInputBinding::LeftStickLeft},
|
{"StickLeft", TRANSLATE_NOOP("USB", "Stick Left"), InputBindingInfo::Type::HalfAxis, CID_STEERING_L, GenericInputBinding::LeftStickLeft},
|
||||||
{"StickRight", "Stick Right", InputBindingInfo::Type::HalfAxis, CID_STEERING_R, GenericInputBinding::LeftStickRight},
|
{"StickRight", TRANSLATE_NOOP("USB", "Stick Right"), InputBindingInfo::Type::HalfAxis, CID_STEERING_R, GenericInputBinding::LeftStickRight},
|
||||||
{"StickUp", "Stick Up", InputBindingInfo::Type::HalfAxis, CID_THROTTLE, GenericInputBinding::LeftStickUp},
|
{"StickUp", TRANSLATE_NOOP("USB", "Stick Up"), InputBindingInfo::Type::HalfAxis, CID_THROTTLE, GenericInputBinding::LeftStickUp},
|
||||||
{"StickDown", "Stick Down", InputBindingInfo::Type::HalfAxis, CID_BRAKE, GenericInputBinding::LeftStickDown},
|
{"StickDown", TRANSLATE_NOOP("USB", "Stick Down"), InputBindingInfo::Type::HalfAxis, CID_BRAKE, GenericInputBinding::LeftStickDown},
|
||||||
{"A", "A", InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::Cross},
|
{"A", TRANSLATE_NOOP("USB", "A"), InputBindingInfo::Type::Button, CID_BUTTON0, GenericInputBinding::Cross},
|
||||||
{"B", "B", InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::Circle},
|
{"B", TRANSLATE_NOOP("USB", "B"), InputBindingInfo::Type::Button, CID_BUTTON1, GenericInputBinding::Circle},
|
||||||
{"C", "C", InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::R2},
|
{"C", TRANSLATE_NOOP("USB", "C"), InputBindingInfo::Type::Button, CID_BUTTON2, GenericInputBinding::R2},
|
||||||
{"X", "X", InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Square},
|
{"X", TRANSLATE_NOOP("USB", "X"), InputBindingInfo::Type::Button, CID_BUTTON3, GenericInputBinding::Square},
|
||||||
{"Y", "Y", InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::Triangle},
|
{"Y", TRANSLATE_NOOP("USB", "Y"), InputBindingInfo::Type::Button, CID_BUTTON4, GenericInputBinding::Triangle},
|
||||||
{"Z", "Z", InputBindingInfo::Type::Button, CID_BUTTON5, GenericInputBinding::L2},
|
{"Z", TRANSLATE_NOOP("USB", "Z"), InputBindingInfo::Type::Button, CID_BUTTON5, GenericInputBinding::L2},
|
||||||
{"L", "L", InputBindingInfo::Type::Button, CID_BUTTON6, GenericInputBinding::L1},
|
{"L", TRANSLATE_NOOP("USB", "L"), InputBindingInfo::Type::Button, CID_BUTTON6, GenericInputBinding::L1},
|
||||||
{"R", "R", InputBindingInfo::Type::Button, CID_BUTTON7, GenericInputBinding::R1},
|
{"R", TRANSLATE_NOOP("USB", "R"), InputBindingInfo::Type::Button, CID_BUTTON7, GenericInputBinding::R1},
|
||||||
{"Select", "Select", InputBindingInfo::Type::Button, CID_BUTTON8, GenericInputBinding::Select},
|
{"Select", TRANSLATE_NOOP("USB", "Select"), InputBindingInfo::Type::Button, CID_BUTTON8, GenericInputBinding::Select},
|
||||||
{"Start", "Start", InputBindingInfo::Type::Button, CID_BUTTON9, GenericInputBinding::Start},
|
{"Start", TRANSLATE_NOOP("USB", "Start"), InputBindingInfo::Type::Button, CID_BUTTON9, GenericInputBinding::Start},
|
||||||
{"DPadUp", "D-Pad Up", InputBindingInfo::Type::Button, CID_DPAD_UP, GenericInputBinding::DPadUp},
|
{"DPadUp", TRANSLATE_NOOP("USB", "D-Pad Up"), InputBindingInfo::Type::Button, CID_DPAD_UP, GenericInputBinding::DPadUp},
|
||||||
{"DPadDown", "D-Pad Down", InputBindingInfo::Type::Button, CID_DPAD_DOWN, GenericInputBinding::DPadDown},
|
{"DPadDown", TRANSLATE_NOOP("USB", "D-Pad Down"), InputBindingInfo::Type::Button, CID_DPAD_DOWN, GenericInputBinding::DPadDown},
|
||||||
{"DPadLeft", "D-Pad Left", InputBindingInfo::Type::Button, CID_DPAD_LEFT, GenericInputBinding::DPadLeft},
|
{"DPadLeft", TRANSLATE_NOOP("USB", "D-Pad Left"), InputBindingInfo::Type::Button, CID_DPAD_LEFT, GenericInputBinding::DPadLeft},
|
||||||
{"DPadRight", "D-Pad Right", InputBindingInfo::Type::Button, CID_DPAD_RIGHT, GenericInputBinding::DPadRight},
|
{"DPadRight", TRANSLATE_NOOP("USB", "D-Pad Right"), InputBindingInfo::Type::Button, CID_DPAD_RIGHT, GenericInputBinding::DPadRight},
|
||||||
};
|
};
|
||||||
|
|
||||||
return bindings;
|
return bindings;
|
||||||
|
@ -387,9 +388,11 @@ namespace usb_pad
|
||||||
gsl::span<const SettingInfo> SeamicDevice::Settings(u32 subtype) const
|
gsl::span<const SettingInfo> SeamicDevice::Settings(u32 subtype) const
|
||||||
{
|
{
|
||||||
static constexpr const SettingInfo info[] = {
|
static constexpr const SettingInfo info[] = {
|
||||||
{SettingInfo::Type::StringList, "input_device_name", "Input Device", "Selects the device to read audio from.", "", nullptr,
|
{SettingInfo::Type::StringList, "input_device_name", TRANSLATE_NOOP("USB", "Input Device"),
|
||||||
nullptr, nullptr, nullptr, nullptr, &AudioDevice::GetInputDeviceList},
|
TRANSLATE_NOOP("USB", "Selects the device to read audio from."), "", nullptr, nullptr, nullptr, nullptr,
|
||||||
{SettingInfo::Type::Integer, "input_latency", "Input Latency", "Specifies the latency to the host input device.",
|
nullptr, &AudioDevice::GetInputDeviceList},
|
||||||
|
{SettingInfo::Type::Integer, "input_latency", TRANSLATE_NOOP("USB", "Input Latency"),
|
||||||
|
TRANSLATE_NOOP("USB", "Specifies the latency to the host input device."),
|
||||||
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", "%dms", nullptr, nullptr, 1.0f},
|
AudioDevice::DEFAULT_LATENCY_STR, "1", "1000", "1", "%dms", nullptr, nullptr, 1.0f},
|
||||||
};
|
};
|
||||||
return info;
|
return info;
|
||||||
|
|
|
@ -97,12 +97,14 @@ namespace usb_printer
|
||||||
if (!s->print_file)
|
if (!s->print_file)
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("USBPrinterOpen", ICON_FA_EXCLAMATION_TRIANGLE,
|
Host::AddIconOSDMessage("USBPrinterOpen", ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
fmt::format("Failed to open '{}' for printing.", s->print_filename), Host::OSD_ERROR_DURATION);
|
fmt::format(TRANSLATE_SV("USB", "Failed to open '{}' for printing."), s->print_filename),
|
||||||
|
Host::OSD_ERROR_DURATION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Host::AddIconOSDMessage("USBPrinterOpen", ICON_FA_SAVE,
|
Host::AddIconOSDMessage("USBPrinterOpen", ICON_FA_SAVE,
|
||||||
fmt::format("Printer saving to '{}'...", Path::GetFileName(s->print_filename)), Host::OSD_INFO_DURATION);
|
fmt::format(TRANSLATE_SV("USB", "Printer saving to '{}'..."), Path::GetFileName(s->print_filename)),
|
||||||
|
Host::OSD_INFO_DURATION);
|
||||||
|
|
||||||
BMPHeader header = {0};
|
BMPHeader header = {0};
|
||||||
header.magic = 0x4D42;
|
header.magic = 0x4D42;
|
||||||
|
@ -329,7 +331,7 @@ namespace usb_printer
|
||||||
|
|
||||||
const char* PrinterDevice::Name() const
|
const char* PrinterDevice::Name() const
|
||||||
{
|
{
|
||||||
return "Printer";
|
return TRANSLATE_NOOP("USB", "Printer");
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* PrinterDevice::TypeName() const
|
const char* PrinterDevice::TypeName() const
|
||||||
|
|
|
@ -1541,7 +1541,8 @@ bool VMManager::DoSaveState(const char* filename, s32 slot_for_message, bool zip
|
||||||
if (!FileSystem::RenamePath(filename, backup_filename.c_str()))
|
if (!FileSystem::RenamePath(filename, backup_filename.c_str()))
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(std::move(osd_key), ICON_FA_EXCLAMATION_TRIANGLE,
|
Host::AddIconOSDMessage(std::move(osd_key), ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
fmt::format("Failed to back up old save state {}.", Path::GetFileName(filename)),
|
fmt::format(
|
||||||
|
TRANSLATE_SV("VMManager", "Failed to back up old save state {}."), Path::GetFileName(filename)),
|
||||||
Host::OSD_ERROR_DURATION);
|
Host::OSD_ERROR_DURATION);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1564,7 +1565,8 @@ bool VMManager::DoSaveState(const char* filename, s32 slot_for_message, bool zip
|
||||||
catch (Exception::BaseException& e)
|
catch (Exception::BaseException& e)
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(std::move(osd_key), ICON_FA_EXCLAMATION_TRIANGLE,
|
Host::AddIconOSDMessage(std::move(osd_key), ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
fmt::format("Failed to save save state: {}.", e.DiagMsg()), Host::OSD_ERROR_DURATION);
|
fmt::format(TRANSLATE_SV("VMManager", "Failed to save save state: {}."), e.DiagMsg()),
|
||||||
|
Host::OSD_ERROR_DURATION);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1578,13 +1580,17 @@ void VMManager::ZipSaveState(std::unique_ptr<ArchiveEntryList> elist,
|
||||||
if (SaveState_ZipToDisk(std::move(elist), std::move(screenshot), filename))
|
if (SaveState_ZipToDisk(std::move(elist), std::move(screenshot), filename))
|
||||||
{
|
{
|
||||||
if (slot_for_message >= 0 && VMManager::HasValidVM())
|
if (slot_for_message >= 0 && VMManager::HasValidVM())
|
||||||
|
{
|
||||||
Host::AddIconOSDMessage(std::move(osd_key), ICON_FA_SAVE,
|
Host::AddIconOSDMessage(std::move(osd_key), ICON_FA_SAVE,
|
||||||
fmt::format("State saved to slot {}.", slot_for_message), Host::OSD_QUICK_DURATION);
|
fmt::format(TRANSLATE_SV("VMManager", "State saved to slot {}."), slot_for_message),
|
||||||
|
Host::OSD_QUICK_DURATION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage(std::move(osd_key), ICON_FA_EXCLAMATION_TRIANGLE,
|
Host::AddIconOSDMessage(std::move(osd_key), ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
fmt::format("Failed to save save state to slot {}.", slot_for_message), Host::OSD_ERROR_DURATION);
|
fmt::format(TRANSLATE_SV("VMManager", "Failed to save save state to slot {}."), slot_for_message,
|
||||||
|
Host::OSD_ERROR_DURATION));
|
||||||
}
|
}
|
||||||
|
|
||||||
DevCon.WriteLn("Zipping save state to '%s' took %.2f ms", filename, timer.GetTimeMilliseconds());
|
DevCon.WriteLn("Zipping save state to '%s' took %.2f ms", filename, timer.GetTimeMilliseconds());
|
||||||
|
@ -1670,7 +1676,8 @@ bool VMManager::LoadStateFromSlot(s32 slot)
|
||||||
if (filename.empty())
|
if (filename.empty())
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("LoadStateFromSlot", ICON_FA_EXCLAMATION_TRIANGLE,
|
Host::AddIconOSDMessage("LoadStateFromSlot", ICON_FA_EXCLAMATION_TRIANGLE,
|
||||||
fmt::format("There is no save state in slot {}.", slot), 5.0f);
|
fmt::format(TRANSLATE_SV("VMManager", "There is no save state in slot {}."), slot),
|
||||||
|
Host::OSD_QUICK_DURATION);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1682,7 +1689,7 @@ bool VMManager::LoadStateFromSlot(s32 slot)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Host::AddIconOSDMessage("LoadStateFromSlot", ICON_FA_FOLDER_OPEN,
|
Host::AddIconOSDMessage("LoadStateFromSlot", ICON_FA_FOLDER_OPEN,
|
||||||
fmt::format("Loading state from slot {}...", slot), Host::OSD_QUICK_DURATION);
|
fmt::format(TRANSLATE_SV("VMManager", "Loading state from slot {}..."), slot), Host::OSD_QUICK_DURATION);
|
||||||
return DoLoadState(filename.c_str());
|
return DoLoadState(filename.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1698,8 +1705,8 @@ bool VMManager::SaveStateToSlot(s32 slot, bool zip_on_thread)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// if it takes more than a minute.. well.. wtf.
|
// if it takes more than a minute.. well.. wtf.
|
||||||
Host::AddIconOSDMessage(
|
Host::AddIconOSDMessage(fmt::format("SaveStateSlot{}", slot), ICON_FA_SAVE,
|
||||||
fmt::format("SaveStateSlot{}", slot), ICON_FA_SAVE, fmt::format("Saving state to slot {}...", slot), 60.0f);
|
fmt::format(TRANSLATE_SV("VMManager", "Saving state to slot {}..."), slot), 60.0f);
|
||||||
return DoSaveState(filename.c_str(), slot, zip_on_thread, EmuConfig.BackupSavestate);
|
return DoSaveState(filename.c_str(), slot, zip_on_thread, EmuConfig.BackupSavestate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1760,15 +1767,21 @@ bool VMManager::ChangeDisc(CDVD_SourceType source, std::string path)
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
if (source == CDVD_SourceType::NoDisc)
|
if (source == CDVD_SourceType::NoDisc)
|
||||||
Host::AddIconOSDMessage("ChangeDisc", ICON_FA_COMPACT_DISC, "Disc removed.", Host::OSD_INFO_DURATION);
|
{
|
||||||
|
Host::AddIconOSDMessage("ChangeDisc", ICON_FA_COMPACT_DISC, TRANSLATE_SV("VMManager", "Disc removed."),
|
||||||
|
Host::OSD_INFO_DURATION);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
Host::AddIconOSDMessage("ChangeDisc", ICON_FA_COMPACT_DISC,
|
Host::AddIconOSDMessage("ChangeDisc", ICON_FA_COMPACT_DISC,
|
||||||
fmt::format("Disc changed to '{}'.", display_name), Host::OSD_INFO_DURATION);
|
fmt::format(TRANSLATE_SV("VMManager", "Disc changed to '{}'."), display_name), Host::OSD_INFO_DURATION);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("ChangeDisc", ICON_FA_COMPACT_DISC,
|
Host::AddIconOSDMessage("ChangeDisc", ICON_FA_COMPACT_DISC,
|
||||||
fmt::format("Failed to open new disc image '{}'. Reverting to old image.", display_name),
|
fmt::format(
|
||||||
|
TRANSLATE_SV("VMManager", "Failed to open new disc image '{}'. Reverting to old image."), display_name),
|
||||||
Host::OSD_ERROR_DURATION);
|
Host::OSD_ERROR_DURATION);
|
||||||
CDVDsys_ChangeSource(old_type);
|
CDVDsys_ChangeSource(old_type);
|
||||||
if (!old_path.empty())
|
if (!old_path.empty())
|
||||||
|
@ -1776,7 +1789,8 @@ bool VMManager::ChangeDisc(CDVD_SourceType source, std::string path)
|
||||||
if (!DoCDVDopen())
|
if (!DoCDVDopen())
|
||||||
{
|
{
|
||||||
Host::AddIconOSDMessage("ChangeDisc", ICON_FA_COMPACT_DISC,
|
Host::AddIconOSDMessage("ChangeDisc", ICON_FA_COMPACT_DISC,
|
||||||
"Failed to switch back to old disc image. Removing disc.", Host::OSD_CRITICAL_ERROR_DURATION);
|
TRANSLATE_SV("VMManager", "Failed to switch back to old disc image. Removing disc."),
|
||||||
|
Host::OSD_CRITICAL_ERROR_DURATION);
|
||||||
CDVDsys_ChangeSource(CDVD_SourceType::NoDisc);
|
CDVDsys_ChangeSource(CDVD_SourceType::NoDisc);
|
||||||
DoCDVDopen();
|
DoCDVDopen();
|
||||||
}
|
}
|
||||||
|
@ -2207,7 +2221,8 @@ void VMManager::EnforceAchievementsChallengeModeSettings()
|
||||||
if (EmuConfig.EnableCheats)
|
if (EmuConfig.EnableCheats)
|
||||||
{
|
{
|
||||||
Host::AddKeyedOSDMessage("ChallengeDisableCheats",
|
Host::AddKeyedOSDMessage("ChallengeDisableCheats",
|
||||||
"Cheats have been disabled due to achievements hardcore mode.", Host::OSD_WARNING_DURATION);
|
TRANSLATE_STR("VMManager", "Cheats have been disabled due to achievements hardcore mode."),
|
||||||
|
Host::OSD_WARNING_DURATION);
|
||||||
EmuConfig.EnableCheats = false;
|
EmuConfig.EnableCheats = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2251,52 +2266,95 @@ void VMManager::WarnAboutUnsafeSettings()
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::string messages;
|
std::string messages;
|
||||||
|
auto append = [&messages](const char* icon, const std::string_view& msg)
|
||||||
|
{
|
||||||
|
messages += icon;
|
||||||
|
messages += ' ';
|
||||||
|
messages += msg;
|
||||||
|
messages += '\n';
|
||||||
|
};
|
||||||
|
|
||||||
if (EmuConfig.Speedhacks.fastCDVD)
|
if (EmuConfig.Speedhacks.fastCDVD)
|
||||||
messages += ICON_FA_COMPACT_DISC " Fast CDVD is enabled, this may break games.\n";
|
append(ICON_FA_COMPACT_DISC, TRANSLATE_SV("VMManager", "Fast CDVD is enabled, this may break games."));
|
||||||
if (EmuConfig.Speedhacks.EECycleRate != 0 || EmuConfig.Speedhacks.EECycleSkip != 0)
|
if (EmuConfig.Speedhacks.EECycleRate != 0 || EmuConfig.Speedhacks.EECycleSkip != 0)
|
||||||
messages +=
|
{
|
||||||
ICON_FA_TACHOMETER_ALT " Cycle rate/skip is not at default, this may crash or make games run too slow.\n";
|
append(ICON_FA_TACHOMETER_ALT,
|
||||||
|
TRANSLATE_SV("VMManager", "Cycle rate/skip is not at default, this may crash or make games run too slow."));
|
||||||
|
}
|
||||||
if (EmuConfig.SPU2.SynchMode == Pcsx2Config::SPU2Options::SynchronizationMode::ASync)
|
if (EmuConfig.SPU2.SynchMode == Pcsx2Config::SPU2Options::SynchronizationMode::ASync)
|
||||||
messages += ICON_FA_VOLUME_MUTE " Audio is using async mix, expect desynchronization in FMVs.\n";
|
{
|
||||||
|
append(ICON_FA_VOLUME_MUTE,
|
||||||
|
TRANSLATE_SV("VMManager", "Audio is using async mix, expect desynchronization in FMVs."));
|
||||||
|
}
|
||||||
if (EmuConfig.GS.UpscaleMultiplier < 1.0f)
|
if (EmuConfig.GS.UpscaleMultiplier < 1.0f)
|
||||||
messages += ICON_FA_TV " Upscale multiplier is below native, this will break rendering.\n";
|
append(ICON_FA_TV, TRANSLATE_SV("VMManager", "Upscale multiplier is below native, this will break rendering."));
|
||||||
if (EmuConfig.GS.HWMipmap != HWMipmapLevel::Automatic)
|
if (EmuConfig.GS.HWMipmap != HWMipmapLevel::Automatic)
|
||||||
messages += ICON_FA_IMAGES " Mipmapping is not set to automatic. This may break rendering in some games.\n";
|
{
|
||||||
|
append(ICON_FA_IMAGES,
|
||||||
|
TRANSLATE_SV("VMManager", "Mipmapping is not set to automatic. This may break rendering in some games."));
|
||||||
|
}
|
||||||
if (EmuConfig.GS.TextureFiltering != BiFiltering::PS2)
|
if (EmuConfig.GS.TextureFiltering != BiFiltering::PS2)
|
||||||
messages += ICON_FA_FILTER
|
{
|
||||||
" Texture filtering is not set to Bilinear (PS2). This will break rendering in some games.\n";
|
append(ICON_FA_FILTER,
|
||||||
|
TRANSLATE_SV("VMManager",
|
||||||
|
"Texture filtering is not set to Bilinear (PS2). This will break rendering in some games."));
|
||||||
|
}
|
||||||
if (EmuConfig.GS.TriFilter != TriFiltering::Automatic)
|
if (EmuConfig.GS.TriFilter != TriFiltering::Automatic)
|
||||||
messages +=
|
{
|
||||||
ICON_FA_PAGER " Trilinear filtering is not set to automatic. This may break rendering in some games.\n";
|
append(
|
||||||
|
ICON_FA_PAGER, TRANSLATE_SV("VMManager",
|
||||||
|
"Trilinear filtering is not set to automatic. This may break rendering in some games."));
|
||||||
|
}
|
||||||
if (EmuConfig.GS.AccurateBlendingUnit <= AccBlendLevel::Minimum)
|
if (EmuConfig.GS.AccurateBlendingUnit <= AccBlendLevel::Minimum)
|
||||||
messages += ICON_FA_BLENDER " Blending is below basic, this may break effects in some games.\n";
|
{
|
||||||
|
append(ICON_FA_BLENDER,
|
||||||
|
TRANSLATE_SV("VMManager", "Blending is below basic, this may break effects in some games."));
|
||||||
|
}
|
||||||
if (EmuConfig.GS.HWDownloadMode != GSHardwareDownloadMode::Enabled)
|
if (EmuConfig.GS.HWDownloadMode != GSHardwareDownloadMode::Enabled)
|
||||||
messages += ICON_FA_DOWNLOAD
|
{
|
||||||
" Hardware Download Mode is not set to Accurate, this may break rendering in some games.\n";
|
append(ICON_FA_DOWNLOAD,
|
||||||
|
TRANSLATE_SV(
|
||||||
|
"VMManager", "Hardware Download Mode is not set to Accurate, this may break rendering in some games."));
|
||||||
|
}
|
||||||
if (EmuConfig.Cpu.sseMXCSR.GetRoundMode() != SSEround_Chop)
|
if (EmuConfig.Cpu.sseMXCSR.GetRoundMode() != SSEround_Chop)
|
||||||
messages += ICON_FA_MICROCHIP " EE FPU Round Mode is not set to default, this may break some games.\n";
|
{
|
||||||
|
append(ICON_FA_MICROCHIP,
|
||||||
|
TRANSLATE_SV("VMManager", "EE FPU Round Mode is not set to default, this may break some games."));
|
||||||
|
}
|
||||||
if (!EmuConfig.Cpu.Recompiler.fpuOverflow || EmuConfig.Cpu.Recompiler.fpuExtraOverflow ||
|
if (!EmuConfig.Cpu.Recompiler.fpuOverflow || EmuConfig.Cpu.Recompiler.fpuExtraOverflow ||
|
||||||
EmuConfig.Cpu.Recompiler.fpuFullMode)
|
EmuConfig.Cpu.Recompiler.fpuFullMode)
|
||||||
messages += ICON_FA_MICROCHIP " EE FPU Clamp Mode is not set to default, this may break some games.\n";
|
{
|
||||||
|
append(ICON_FA_MICROCHIP,
|
||||||
|
TRANSLATE_SV("VMManager", "EE FPU Clamp Mode is not set to default, this may break some games."));
|
||||||
|
}
|
||||||
if (EmuConfig.Cpu.sseVU0MXCSR.GetRoundMode() != SSEround_Chop ||
|
if (EmuConfig.Cpu.sseVU0MXCSR.GetRoundMode() != SSEround_Chop ||
|
||||||
EmuConfig.Cpu.sseVU1MXCSR.GetRoundMode() != SSEround_Chop)
|
EmuConfig.Cpu.sseVU1MXCSR.GetRoundMode() != SSEround_Chop)
|
||||||
messages += ICON_FA_MICROCHIP " VU Round Mode is not set to default, this may break some games.\n";
|
{
|
||||||
|
append(ICON_FA_MICROCHIP,
|
||||||
|
TRANSLATE_SV("VMManager", "VU Round Mode is not set to default, this may break some games."));
|
||||||
|
}
|
||||||
if (!EmuConfig.Cpu.Recompiler.vu0Overflow || EmuConfig.Cpu.Recompiler.vu0ExtraOverflow ||
|
if (!EmuConfig.Cpu.Recompiler.vu0Overflow || EmuConfig.Cpu.Recompiler.vu0ExtraOverflow ||
|
||||||
EmuConfig.Cpu.Recompiler.vu0SignOverflow || !EmuConfig.Cpu.Recompiler.vu1Overflow ||
|
EmuConfig.Cpu.Recompiler.vu0SignOverflow || !EmuConfig.Cpu.Recompiler.vu1Overflow ||
|
||||||
EmuConfig.Cpu.Recompiler.vu1ExtraOverflow || EmuConfig.Cpu.Recompiler.vu1SignOverflow)
|
EmuConfig.Cpu.Recompiler.vu1ExtraOverflow || EmuConfig.Cpu.Recompiler.vu1SignOverflow)
|
||||||
{
|
{
|
||||||
messages += ICON_FA_MICROCHIP " VU Clamp Mode is not set to default, this may break some games.\n";
|
append(ICON_FA_MICROCHIP,
|
||||||
|
TRANSLATE_SV("VMManager", "VU Clamp Mode is not set to default, this may break some games."));
|
||||||
}
|
}
|
||||||
if (!EmuConfig.EnableGameFixes)
|
if (!EmuConfig.EnableGameFixes)
|
||||||
messages += ICON_FA_GAMEPAD " Game Fixes are not enabled. Compatibility with some games may be affected.\n";
|
{
|
||||||
|
append(ICON_FA_GAMEPAD,
|
||||||
|
TRANSLATE_SV("VMManager", "Game Fixes are not enabled. Compatibility with some games may be affected."));
|
||||||
|
}
|
||||||
if (!EmuConfig.EnablePatches)
|
if (!EmuConfig.EnablePatches)
|
||||||
messages +=
|
{
|
||||||
ICON_FA_GAMEPAD " Compatibility Patches are not enabled. Compatibility with some games may be affected.\n";
|
append(ICON_FA_GAMEPAD,
|
||||||
|
TRANSLATE_SV(
|
||||||
|
"VMManager", "Compatibility Patches are not enabled. Compatibility with some games may be affected."));
|
||||||
|
}
|
||||||
if (EmuConfig.GS.FramerateNTSC != Pcsx2Config::GSOptions::DEFAULT_FRAME_RATE_NTSC)
|
if (EmuConfig.GS.FramerateNTSC != Pcsx2Config::GSOptions::DEFAULT_FRAME_RATE_NTSC)
|
||||||
messages += ICON_FA_TV " Frame rate for NTSC is not default. This may break some games.\n";
|
append(ICON_FA_TV, TRANSLATE_SV("VMManager", "Frame rate for NTSC is not default. This may break some games."));
|
||||||
if (EmuConfig.GS.FrameratePAL != Pcsx2Config::GSOptions::DEFAULT_FRAME_RATE_PAL)
|
if (EmuConfig.GS.FrameratePAL != Pcsx2Config::GSOptions::DEFAULT_FRAME_RATE_PAL)
|
||||||
messages += ICON_FA_TV " Frame rate for PAL is not default. This may break some games.\n";
|
append(ICON_FA_TV, TRANSLATE_SV("VMManager", "Frame rate for PAL is not default. This may break some games."));
|
||||||
|
|
||||||
if (!messages.empty())
|
if (!messages.empty())
|
||||||
{
|
{
|
||||||
|
@ -2313,33 +2371,65 @@ void VMManager::WarnAboutUnsafeSettings()
|
||||||
|
|
||||||
messages.clear();
|
messages.clear();
|
||||||
if (!EmuConfig.Cpu.Recompiler.EnableEE)
|
if (!EmuConfig.Cpu.Recompiler.EnableEE)
|
||||||
messages +=
|
{
|
||||||
ICON_FA_EXCLAMATION_CIRCLE " EE Recompiler is not enabled, this will significantly reduce performance.\n";
|
append(ICON_FA_EXCLAMATION_CIRCLE,
|
||||||
|
TRANSLATE_SV("VMManager", "EE Recompiler is not enabled, this will significantly reduce performance."));
|
||||||
|
}
|
||||||
if (!EmuConfig.Cpu.Recompiler.EnableVU0)
|
if (!EmuConfig.Cpu.Recompiler.EnableVU0)
|
||||||
messages +=
|
{
|
||||||
ICON_FA_EXCLAMATION_CIRCLE " VU0 Recompiler is not enabled, this will significantly reduce performance.\n";
|
append(ICON_FA_EXCLAMATION_CIRCLE,
|
||||||
|
TRANSLATE_SV("VMManager", "VU0 Recompiler is not enabled, this will significantly reduce performance."));
|
||||||
|
}
|
||||||
if (!EmuConfig.Cpu.Recompiler.EnableVU1)
|
if (!EmuConfig.Cpu.Recompiler.EnableVU1)
|
||||||
messages +=
|
{
|
||||||
ICON_FA_EXCLAMATION_CIRCLE " VU1 Recompiler is not enabled, this will significantly reduce performance.\n";
|
append(ICON_FA_EXCLAMATION_CIRCLE,
|
||||||
|
TRANSLATE_SV("VMManager", "VU1 Recompiler is not enabled, this will significantly reduce performance."));
|
||||||
|
}
|
||||||
if (!EmuConfig.Cpu.Recompiler.EnableIOP)
|
if (!EmuConfig.Cpu.Recompiler.EnableIOP)
|
||||||
messages +=
|
{
|
||||||
ICON_FA_EXCLAMATION_CIRCLE " IOP Recompiler is not enabled, this will significantly reduce performance.\n";
|
append(ICON_FA_EXCLAMATION_CIRCLE,
|
||||||
|
TRANSLATE_SV("VMManager", "IOP Recompiler is not enabled, this will significantly reduce performance."));
|
||||||
|
}
|
||||||
if (EmuConfig.Cpu.Recompiler.EnableEECache)
|
if (EmuConfig.Cpu.Recompiler.EnableEECache)
|
||||||
messages += ICON_FA_EXCLAMATION_CIRCLE " EE Cache is enabled, this will significantly reduce performance.\n";
|
{
|
||||||
|
append(ICON_FA_EXCLAMATION_CIRCLE,
|
||||||
|
TRANSLATE_SV("VMManager", "EE Cache is enabled, this will significantly reduce performance."));
|
||||||
|
}
|
||||||
if (!EmuConfig.Speedhacks.WaitLoop)
|
if (!EmuConfig.Speedhacks.WaitLoop)
|
||||||
messages += ICON_FA_EXCLAMATION_CIRCLE " EE Wait Loop Detection is not enabled, this may reduce performance.\n";
|
{
|
||||||
|
append(ICON_FA_EXCLAMATION_CIRCLE,
|
||||||
|
TRANSLATE_SV("VMManager", "EE Wait Loop Detection is not enabled, this may reduce performance."));
|
||||||
|
}
|
||||||
if (!EmuConfig.Speedhacks.IntcStat)
|
if (!EmuConfig.Speedhacks.IntcStat)
|
||||||
messages += ICON_FA_EXCLAMATION_CIRCLE " INTC Spin Detection is not enabled, this may reduce performance.\n";
|
{
|
||||||
|
append(ICON_FA_EXCLAMATION_CIRCLE,
|
||||||
|
TRANSLATE_SV("VMManager", "INTC Spin Detection is not enabled, this may reduce performance."));
|
||||||
|
}
|
||||||
if (!EmuConfig.Speedhacks.vu1Instant)
|
if (!EmuConfig.Speedhacks.vu1Instant)
|
||||||
messages += ICON_FA_EXCLAMATION_CIRCLE " Instant VU1 is disabled, this may reduce performance.\n";
|
{
|
||||||
|
append(ICON_FA_EXCLAMATION_CIRCLE,
|
||||||
|
TRANSLATE_SV("VMManager", "Instant VU1 is disabled, this may reduce performance."));
|
||||||
|
}
|
||||||
if (!EmuConfig.Speedhacks.vuFlagHack)
|
if (!EmuConfig.Speedhacks.vuFlagHack)
|
||||||
messages += ICON_FA_EXCLAMATION_CIRCLE " mVU Flag Hack is not enabled, this may reduce performance.\n";
|
{
|
||||||
|
append(ICON_FA_EXCLAMATION_CIRCLE,
|
||||||
|
TRANSLATE_SV("VMManager", "mVU Flag Hack is not enabled, this may reduce performance."));
|
||||||
|
}
|
||||||
if (EmuConfig.GS.GPUPaletteConversion)
|
if (EmuConfig.GS.GPUPaletteConversion)
|
||||||
messages += ICON_FA_EXCLAMATION_CIRCLE " GPU Palette Conversion is enabled, this may reduce performance.\n";
|
{
|
||||||
|
append(ICON_FA_EXCLAMATION_CIRCLE,
|
||||||
|
TRANSLATE_SV("VMManager", "GPU Palette Conversion is enabled, this may reduce performance."));
|
||||||
|
}
|
||||||
if (EmuConfig.GS.TexturePreloading != TexturePreloadingLevel::Full)
|
if (EmuConfig.GS.TexturePreloading != TexturePreloadingLevel::Full)
|
||||||
messages += ICON_FA_EXCLAMATION_CIRCLE " Texture Preloading is not Full, this may reduce performance.\n";
|
{
|
||||||
|
append(ICON_FA_EXCLAMATION_CIRCLE,
|
||||||
|
TRANSLATE_SV("VMManager", "Texture Preloading is not Full, this may reduce performance."));
|
||||||
|
}
|
||||||
if (EmuConfig.GS.UserHacks_EstimateTextureRegion)
|
if (EmuConfig.GS.UserHacks_EstimateTextureRegion)
|
||||||
messages += ICON_FA_EXCLAMATION_CIRCLE " Estimate texture region is enabled, this may reduce performance.\n";
|
{
|
||||||
|
append(ICON_FA_EXCLAMATION_CIRCLE,
|
||||||
|
TRANSLATE_SV("VMManager", "Estimate texture region is enabled, this may reduce performance."));
|
||||||
|
}
|
||||||
|
|
||||||
if (!messages.empty())
|
if (!messages.empty())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue