New translation approach with external text files

This commit is contained in:
Marat Tanalin 2020-09-13 04:16:49 +03:00
parent 858cb3768a
commit f7d82b8732
53 changed files with 2329 additions and 3921 deletions

65
bsnes-mt/files.cpp Normal file
View file

@ -0,0 +1,65 @@
/*! bsnes-mt by Marat Tanalin | http://tanalin.com/en/projects/bsnes-mt/ */
#include <filesystem>
#include <fstream>
#include <sstream>
#include <Windows.h>
#include "pizza-png/src/Image.h"
#include "app.h"
#include "strings.h"
#include "files.h"
namespace bsnesMt::files {
auto fileExists(const string &name) -> bool {
return std::filesystem::exists(strings::utf8ToWideString(name).data());
}
auto getTextFileContents(const string &name) -> string {
std::ifstream in(name);
std::stringstream ss;
ss << in.rdbuf();
return ss.str();
}
auto saveFile(const string &data, const string &path) -> bool {
HANDLE handle = CreateFileW(strings::utf8ToWideString(path).data(), GENERIC_WRITE, 0,
NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
if (INVALID_HANDLE_VALUE == handle) {
return false;
}
DWORD bytesToWrite = data.size();
DWORD bytesWritten = 0;
BOOL errorFlag = WriteFile(handle, data.data(), bytesToWrite, &bytesWritten, NULL);
if (FALSE == errorFlag || bytesWritten != bytesToWrite) {
return false;
}
CloseHandle(handle);
return true;
}
auto saveBgraArrayAsPngImage(uint8_t* data, uint16_t width, uint16_t height, const string &path) -> bool {
MaratTanalin::PizzaPNG::Image image(width, height);
size_t pixelCount = width * height;
for (size_t i = 0; i < pixelCount; i++) {
size_t blueIndex = i << 2;
image.addPixel(data[blueIndex + 2], data[blueIndex + 1], data[blueIndex]);
}
image.insertChunk(strings::ucharVectorToString(app::pngInfo));
return saveFile(image, path);
}
} // namespace bsnesMt::files

20
bsnes-mt/files.h Normal file
View file

@ -0,0 +1,20 @@
/*! bsnes-mt by Marat Tanalin | http://tanalin.com/en/projects/bsnes-mt/ */
#pragma once
#include <cstdint>
#include <string>
namespace bsnesMt::files {
using std::string;
auto fileExists(const string &name) -> bool;
auto getTextFileContents(const string &name) -> string;
auto saveFile(const string &data, const string &path) -> bool;
auto saveBgraArrayAsPngImage(uint8_t* data, uint16_t width, uint16_t height, const string &path) -> bool;
} // namespace bsnesMt::files

View file

@ -1,22 +1,19 @@
/*! bsnes-mt by Marat Tanalin | http://tanalin.com/en/projects/bsnes-mt/ */
#include <Windows.h>
#include <Commctrl.h>
#include "strings.h"
#include "utils.h"
#include "translations.h"
#include "messagebox.h"
namespace bsnesMt::windows {
using std::wstring;
auto messageBox(const string &text, const string &title, uint32_t flags, uintptr_t parentWindow) -> int {
return MessageBoxW(
reinterpret_cast<HWND>(parentWindow),
utf8ToWideString(text).data(),
utf8ToWideString(title).data(),
strings::utf8ToWideString(text).data(),
strings::utf8ToWideString(title).data(),
flags
);
}
@ -35,7 +32,7 @@ auto showMessage(const string &text, const string &title, uint32_t flags, uintpt
auto showError(const string &text, const string &title, uintptr_t parentWindow) -> void {
showMessage(
text,
"" == title ? strings::get("Common.Error") : title,
"" == title ? translations::get("Common.Error") : title,
MB_ICONERROR,
parentWindow
);
@ -52,7 +49,7 @@ auto showInfo(const string &text, const string &title, uintptr_t parentWindow) -
auto confirm(const string &text, const string &title, uintptr_t parentWindow) -> bool {
return IDYES == messageBox(
text,
"" == title ? strings::get("Common.AreYouSure") : title,
"" == title ? translations::get("Common.AreYouSure") : title,
MB_ICONQUESTION | MB_YESNO | MB_DEFBUTTON2,
parentWindow
);
@ -62,8 +59,8 @@ auto confirmById(const string &textId, uintptr_t parentWindow) -> bool {
string titleId = textId + ".title";
return confirm(
strings::get(textId),
strings::has(titleId) ? strings::get(titleId) : strings::get("Common.AreYouSure"),
translations::get(textId),
translations::has(titleId) ? translations::get(titleId) : translations::get("Common.AreYouSure"),
parentWindow
);
}

View file

@ -1,139 +1,128 @@
/*! bsnes-mt by Marat Tanalin | http://tanalin.com/en/projects/bsnes-mt/ */
#include <stdexcept>
#include <memory>
#include <windows.h>
#include "utils.h"
#include <Windows.h>
#include "strings.h"
namespace bsnesMt::strings {
using std::wstring, std::out_of_range;
using std::make_unique;
auto getLocale() -> uint8_t {
wstring commandLine = GetCommandLineW();
wstring paramStart = L"--locale=";
auto paramPos = commandLine.find(paramStart);
auto utf8ToWideString(const string &utf8) -> wstring {
wstring wide;
if (string::npos != paramPos) {
wstring value = commandLine.substr(paramPos + paramStart.size(), 2);
auto utf8c = utf8.data();
int size = MultiByteToWideChar(CP_UTF8, 0, utf8c, -1, 0, 0);
if (L"ru" == value) {
return RU;
}
else if (L"it" == value) {
return IT;
}
else if (L"ja" == value || L"jp" == value) { // `jp` for backward compatibility.
return JA;
}
else if (L"en" == value) {
return EN;
}
if (size > 0) {
auto buffer = make_unique<wchar_t[]>(size);
MultiByteToWideChar(CP_UTF8, 0, utf8c, -1, buffer.get(), size);
wide = buffer.get();
}
auto lang = getUiLang();
return wide;
}
uint8_t locale;
auto wideStringToUtf8String(const wstring &wide) -> string {
string utf8;
if (LANG_RUSSIAN == lang) {
locale = RU;
auto widec = wide.data();
int size = WideCharToMultiByte(CP_UTF8, 0, widec, -1, 0, 0, 0, 0);
if (size > 0) {
auto buffer = std::make_unique<char[]>(size);
WideCharToMultiByte(CP_UTF8, 0, widec, -1, buffer.get(), size, 0, 0);
utf8 = buffer.get();
}
else if (LANG_ITALIAN == lang) {
locale = IT;
return utf8;
}
auto replaceByRef(string &str, const string &search, const string &replacement) -> void {
if (search.empty()) {
return;
}
else if (LANG_JAPANESE == lang) {
locale = JA;
const auto searchLength = search.length();
const auto replaceLength = replacement.length();
string::size_type pos = 0;
while ((pos = str.find(search, pos)) != string::npos) {
str.replace(pos, searchLength, replacement);
pos += replaceLength;
}
}
auto replace(string str, const string &search, const string &replacement) -> string {
replaceByRef(str, search, replacement);
return str;
}
auto replace(const string &str, const string &search, char replacement) -> string {
return replace(str, search, string(1, replacement));
}
auto replace(const string &s, char search, char replacement) -> string {
return replace(s, string(1, search), string(1, replacement));
}
auto replaceOnce(const string &s, char search, const string replacement) -> string {
auto pos = s.find(search);
if (string::npos == pos) {
return s;
}
return s.substr(0, pos) + replacement + s.substr(pos + 1);
}
auto unifyLineFeeds(string text) -> string {
text = replace(text, "\r\n", '\n');
text = replace(text, '\r', '\n');
return text;
}
auto trimByRef(string &s, const string &chars) -> void {
string::size_type pos = s.find_last_not_of(chars);
if (pos != string::npos) {
s.erase(pos + 1);
pos = s.find_first_not_of(chars);
if (pos != string::npos) {
s.erase(0, pos);
}
}
else {
locale = EN;
s.erase(s.begin(), s.end());
}
return locale;
}
auto genericHas(const map<string, map<uint8_t, string>> &items, const string &key) -> bool {
try {
auto test = items.at(key);
}
catch (const out_of_range &e) {
return false;
}
return true;
auto trim(string s, const string &chars) -> string {
trimByRef(s, chars);
return s;
}
auto genericHas(const map<string, string> &items, const string &key) -> bool {
try {
auto test = items.at(key);
}
catch (const out_of_range &e) {
return false;
auto trim(const string &s) -> string {
return trim(s, " \t\r\n");
}
auto isWhiteSpace(const string &s) -> bool {
return "" == trim(s);
}
auto ucharVectorToString(const vector<unsigned char> &data) -> string {
string dataString;
for (auto &byte : data) {
dataString += byte;
}
return true;
}
auto has(const string &id) -> bool {
return genericHas(strings, id);
}
auto valueHasLocale(const map<uint8_t, string> &value, uint8_t locale) -> bool {
try {
auto test = value.at(locale);
}
catch (const out_of_range &e) {
return false;
}
return true;
}
auto get(const map<uint8_t, string> &value) -> string {
if (valueHasLocale(value, locale)) {
return value.at(locale);
}
return valueHasLocale(value, EN) ? value.at(EN) : "";
}
auto get(const string &id) -> string {
return has(id) ? get(strings.at(id)) : "";
}
auto getStringOrId(const map<string, map<uint8_t, string>> &values, const string &id) -> string {
auto value = values.at(id);
if (valueHasLocale(value, locale)) {
return value.at(locale);
}
return valueHasLocale(value, EN) ? value.at(EN) : id;
}
auto getDedicatedString(
const map<string, map<uint8_t, string>> &values,
const map<string, string> &dedicatedToRegularStrings,
const string &id
) -> string
{
if (genericHas(values, id)) {
return getStringOrId(values, id);
}
return genericHas(dedicatedToRegularStrings, id)
? get(dedicatedToRegularStrings.at(id))
: id;
}
auto getDeviceString(const string &id) -> string {
return getDedicatedString(deviceStrings, deviceStringsToRegularStrings, id);
}
auto getHotkeyString(const string &id) -> string {
return getDedicatedString(hotkeyStrings, hotkeyStringsToRegularStrings, id);
return dataString;
}
} // namespace bsnesMt::strings

View file

@ -2,39 +2,30 @@
#pragma once
#include <cstdint>
#include <map>
#include <string>
#include "translations.h"
#include <vector>
namespace bsnesMt::strings {
using std::map, std::string;
using std::string, std::wstring, std::vector;
auto getLocale() -> uint8_t;
auto utf8ToWideString(const string &utf8) -> wstring;
auto wideStringToUtf8String(const wstring &wide) -> string;
static uint8_t locale = getLocale();
auto replaceByRef(string &str, const string &search, const string &replacement) -> void;
auto replace(string str, const string &search, const string &replacement) -> string;
auto replace(const string &str, const string &search, char replacement) -> string;
auto replace(const string &s, char search, char replacement) -> string;
auto replaceOnce(const string &s, char search, const string replacement) -> string;
auto genericHas(const map<string, map<uint8_t, string>> &items, const string &key) -> bool;
auto genericHas(const map<string, string> &items, const string &key) -> bool;
auto unifyLineFeeds(string text) -> string;
auto has(const string &id) -> bool;
auto trimByRef(string &s, const string &chars) -> void;
auto trim(string s, const string &chars) -> string;
auto trim(const string &s) -> string;
auto valueHasLocale(const map<uint8_t, string> &value, uint8_t locale) -> bool;
auto isWhiteSpace(const string &s) -> bool;
auto get(const map<uint8_t, string> &value) -> string;
auto get(const string &id) -> string;
auto getStringOrId(const map<string, map<uint8_t, string>> &values, const string &id) -> string;
auto getDedicatedString(
const map<string, map<uint8_t, string>> &values,
const map<string, string> &dedicatedToRegularStrings,
const string &id
) -> string;
auto getDeviceString(const string &id) -> string;
auto getHotkeyString(const string &id) -> string;
auto ucharVectorToString(const vector<unsigned char> &data) -> string;
} // namespace bsnesMt::strings

177
bsnes-mt/translations.cpp Normal file
View file

@ -0,0 +1,177 @@
/*! bsnes-mt by Marat Tanalin | http://tanalin.com/en/projects/bsnes-mt/ */
#include <stdexcept>
#include <Windows.h>
#include <target-bsnes/resource/resources.h>
#include "files.h"
#include "strings.h"
#include "translations.h"
namespace bsnesMt::translations {
using std::wstring, std::out_of_range;
using namespace strings;
string locale;
auto getLocaleName() -> string {
wchar_t buffer[LOCALE_NAME_MAX_LENGTH];
auto length = GetUserDefaultLocaleName(buffer, LOCALE_NAME_MAX_LENGTH);
auto locale = wstring(buffer).substr(0, length - (size_t)1);
auto sepPos = locale.find('-');
locale = wstring::npos == sepPos ? locale : locale.substr(0, sepPos);
return wideStringToUtf8String(locale);
}
auto getFileDataFromResource(int name, int type, DWORD &size, const char* &data) -> void {
HMODULE handle = GetModuleHandle(NULL);
HRSRC rc = FindResource(handle, MAKEINTRESOURCE(name), MAKEINTRESOURCE(type));
HGLOBAL rcData = LoadResource(handle, rc);
size = SizeofResource(handle, rc);
data = static_cast<const char*>(LockResource(rcData));
}
auto getInternalStrings(map<string, string> &strings) -> void {
DWORD size = 0;
const char* data = NULL;
string code;
getFileDataFromResource(IDR_EN_STRINGS, TEXTFILE, size, data);
code.assign(data, size);
parseTranslation(code, strings);
}
auto parseTranslation(const string &code, map<string, string> &strings) -> void {
auto size = code.size();
auto idPos = 0;
auto sepPos = code.find('=');
char quote = '"';
while (true) {
if (string::npos == sepPos) {
break;
}
auto id = trim(code.substr(idPos, sepPos - idPos));
if (isWhiteSpace(id)) {
break;
}
auto afterSepPos = sepPos + 1;
auto startQuotePos = code.find(quote, afterSepPos);
if (string::npos == startQuotePos || !isWhiteSpace(code.substr(afterSepPos, startQuotePos - afterSepPos))) {
break;
}
auto afterStartQuotePos = startQuotePos + 1;
auto endQuotePos = code.find(quote, afterStartQuotePos);
if (string::npos == endQuotePos) {
break;
}
auto value = trim(code.substr(afterStartQuotePos, endQuotePos - afterStartQuotePos));
if ("" != value) {
strings[id] = value;
}
auto afterEndQuotePos = endQuotePos + 1;
idPos = code.find('\n', afterEndQuotePos);
if (string::npos == idPos || !isWhiteSpace(code.substr(afterEndQuotePos, idPos - afterEndQuotePos))) {
break;
}
sepPos = code.find('=', idPos);
}
}
auto initTranslation(const string &locale) -> void {
getInternalStrings(strings);
string path = string("translations/") + locale + ".txt";
if (!files::fileExists(path)) {
return;
}
parseTranslation(files::getTextFileContents(path), strings);
}
auto initLocale() -> void {
string commandLine = wideStringToUtf8String(GetCommandLineW());
string paramStart = "--locale=";
auto paramPos = commandLine.find(paramStart);
string curLocale;
if (string::npos == paramPos) {
curLocale = getLocaleName();
}
else {
curLocale = commandLine.substr(paramPos + paramStart.size(), 2);
if ("jp" == curLocale) { // For backward compatibility.
curLocale = "ja";
}
}
initTranslation(curLocale);
locale = curLocale;
}
auto genericHas(const map<string, string> &items, const string &key) -> bool {
try {
auto test = items.at(key);
}
catch (const out_of_range &e) {
return false;
}
return true;
}
auto has(const string &id) -> bool {
return genericHas(strings, id);
}
auto get(const map<string, string> &value) -> string {
if (genericHas(value, locale)) {
return value.at(locale);
}
return genericHas(value, "en") ? value.at("en") : "";
}
auto get(const string &id) -> string {
return has(id) ? strings.at(id) : "";
}
auto getDedicatedStringId(const map<string, string> &dedicatedStrings, const string &id) -> string {
return genericHas(dedicatedStrings, id)
? dedicatedStrings.at(id)
: id;
}
auto getDeviceString(const string &id) -> string {
auto regularId = getDedicatedStringId(deviceStrings, id);
return has(regularId) ? get(regularId) : id;
}
auto getHotkeyString(const string &id) -> string {
auto regularId = getDedicatedStringId(hotkeyStrings, id);
return has(regularId) ? get(regularId) : id;
}
} // namespace bsnesMt::translations

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,617 @@
Common.Yes = "Yes"
Common.No = "No"
Common.Cancel = "Cancel"
Common.Always = "Always"
Common.AreYouSure = "Are you sure?"
Common.Open = "Open"
Common.Load = "Load"
Common.Save = "Save"
Common.Add = "Add"
Common.Remove = "Remove"
Common.Delete = "Delete"
Common.Rename = "Rename"
Common.Reset = "Reset"
Common.Clear = "Clear"
Common.None = "None"
Common.Disabled = "Disabled"
Common.Default = "Default"
Common.Name = "Name"
Common.Date = "Date"
Common.Success = "Success"
Common.Failure = "Failure"
Common.Error = "Error"
Common.Warning = "Warning"
Common.Auto = "Auto"
Common.Video = "Video"
Common.Audio = "Audio"
Common.Fps = "fps"
Common.Hz = "Hz"
Common.number = "#"
Menu.File = "File"
Menu.File.OpenGame = "Open Game"
Menu.File.OpenRecentGame = "Open Recent Game"
Menu.File.OpenRecentGame.ClearList = "Clear List"
Menu.File.OpenRecentGame.ClearList.confirm.title = "Clear the list of recent games?"
Menu.File.OpenRecentGame.ClearList.confirm = "Are you sure you want to clear the list of recent games?"
Menu.File.OpenRecentGame.NoRecentGames = "No Recent Games"
Menu.File.CloseGame = "Close Game"
Menu.File.Exit = "Exit"
Menu.System = "System"
Menu.System.ControllerPort = "Controller Port"
Menu.System.ExpansionPort = "Expansion Port"
Menu.Settings.Size = "Size"
Menu.Settings.Size.ShrinkWindowToSize = "Shrink Window to Size"
Menu.Settings.Size.CenterWindow = "Center Window"
Menu.Settings.Size.FullScreenMode = "Full-Screen Mode"
Menu.Settings.Size.PseudoFullScreenMode = "Pseudo-Full-Screen Mode"
Menu.Settings.Output = "Output"
Menu.Settings.Output.Center = "Center"
Menu.Settings.Output.PixelPerfect = "Pixel-Perfect"
Menu.Settings.Output.Scale = "Scale"
Menu.Settings.Output.Stretch = "Stretch"
Menu.Settings.Output.AspectRatioCorrection = "Aspect-Ratio Correction"
Menu.Settings.Output.ShowOverscanArea = "Show Overscan Area"
Menu.Settings.Output.scalingInfo = "Scaling Info in Status Bar"
Menu.Settings.Output.HiresBlurEmulation = "Hires Blur Emulation"
Menu.Settings.Filter = "Filter"
Menu.Settings.Shader = "Shader"
Menu.Settings.Shader.Blur = "Blur"
Menu.Settings.MuteAudio = "Mute Audio"
Menu.Settings.ShowStatusBar = "Show Status Bar"
Menu.Settings.OpenSettingsFolder = "Open Settings Folder"
Menu.Help = "Help"
Menu.Help.About = "About |"
Settings = "Settings"
Settings.Common.Assign = "Assign"
Settings.Common.AssignLowercase = "assign"
Settings.Common.Mapping = "Mapping"
Settings.Common.MappingAssigned = "Mapping assigned."
Settings.Common.PressKeyOrButtonForMapping = "Press a key or button for mapping"
Settings.Common.FrameLowercase = "frame"
Settings.Video.ColorAdjustment = "Color Adjustment"
Settings.Video.Luminance = "Luminance"
Settings.Video.Saturation = "Saturation"
Settings.Video.Gamma = "Gamma"
Settings.Video.DimVideoWhenIdle = "Dim video when idle"
Settings.Video.DimVideoWhenIdle.tooltip = "Darkens the video to indicate that the emulation is not running."
Settings.Video.DrawSnowEffectWhenIdle = "Draw snow effect when idle"
Settings.Audio.Effects = "Effects"
Settings.Audio.Skew = "Skew"
Settings.Audio.Skew.tooltip = "
Adjusts the audio frequency by the skew amount (in Hz).
This is essentially static rate control.
First, enable both video and audio sync.
Then, raise or lower this value to try to reduce errors.
One direction will help video, but hurt audio.
The other direction will do the reverse.
The idea is to find the best middle ground.
You should leave this at 0 when using dynamic rate control.
"
Settings.Audio.Volume = "Volume"
Settings.Audio.Volume.tooltip = "
Adjusts the audio output volume.
You should not use values above 100%, if possible!
If you do, audio clipping distortion can occur.
"
Settings.Audio.Balance = "Balance"
Settings.Audio.Balance.tooltip = "
Pans audio to the left (lower values) or right (higher values).
50% (centered) is the recommended setting.
"
Settings.Audio.MuteWhenUnfocused = "Mute when unfocused"
Settings.Input = "Input"
Settings.Input.WhenFocusIsLost = "When focus is lost"
Settings.Input.WhenFocusIsLost.PauseEmulation = "Pause emulation"
Settings.Input.WhenFocusIsLost.BlockInput = "Block input"
Settings.Input.WhenFocusIsLost.AllowInput = "Allow input"
Settings.Input.Port = "Port"
Settings.Input.Device = "Device"
Settings.Input.TurboRate = "Turbo rate"
Settings.Input.TurboRate.tooltip = "The number of frames to wait between toggling turbo buttons."
Settings.Input.MouseLeft = "Mouse Left"
Settings.Input.MouseMiddle = "Mouse Middle"
Settings.Input.MouseRight = "Mouse Right"
Settings.Input.MouseXAxis = "Mouse X-axis"
Settings.Input.MouseYAxis = "Mouse Y-axis"
Settings.Hotkeys = "Hotkeys"
Settings.Hotkeys.CombinationalLogic = "Combinational logic"
Settings.Hotkeys.CombinationalLogic.tooltip = "
Determines whether all or any mappings must be pressed to activate hotkeys.
Use “AND” logic if you want keyboard combinations such as Ctrl+F to trigger a hotkey.
Use “OR” logic if you want both a keyboard and joypad to trigger the same hotkey.
"
Settings.Hotkeys.CombinationalLogic.And = "AND"
Settings.Hotkeys.CombinationalLogic.And.tooltip = "Every mapping must be pressed to activate a given hotkey."
Settings.Hotkeys.CombinationalLogic.Or = "OR"
Settings.Hotkeys.CombinationalLogic.Or.tooltip = "Any mapping can be pressed to activate a given hotkey."
Settings.Hotkeys.Rewind.enableFirst = "Please enable rewind support in “Settings” → “Emulator” first"
Settings.BuiltinHotkeys = "Hotkeys (built-in)"
Settings.Paths = "Paths"
Settings.Paths.Games = "Games"
Settings.Paths.Patches = "Patches"
Settings.Paths.Saves = "Saves"
Settings.Paths.Cheats = "Cheats"
Settings.Paths.States = "States"
Settings.Paths.Screenshots = "Screenshots"
Settings.Paths.LastRecentlyUsed = "last recently used"
Settings.Paths.SameAsLoadedGame = "same as loaded game"
Settings.Emulator = "Emulator"
Settings.Emulator.General = "General"
Settings.Emulator.General.warnOnUnverifiedGames = "Warn when opening games that have not been verified"
Settings.Emulator.General.autoSaveMemory = "Save memory periodically"
Settings.Emulator.General.autoSaveStateOnUnload = "Save undo state when unloading games"
Settings.Emulator.General.AutoResumeOnLoad = "Resume on load"
Settings.Emulator.General.UseNativeFileDialogs = "Use native file dialogs"
Settings.Emulator.FastForward = "Fast Forward"
Settings.Emulator.FastForward.FrameSkip = "Frame skip"
Settings.Emulator.FastForward.FrameSkip.tooltip = "
Sets how many frames to skip while fast forwarding.
Frame skipping allows a higher maximum fast forwarding frame rate.
"
Settings.Emulator.FastForward.FrameSkip.Frames2to4 = "| frames"
Settings.Emulator.FastForward.FrameSkip.Frames = "| frames"
Settings.Emulator.FastForward.Limiter = "Limiter"
Settings.Emulator.FastForward.Limiter.tooltip = "Sets the maximum speed when fast forwarding."
Settings.Emulator.FastForward.mute = "Mute while fast forwarding"
Settings.Emulator.Rewind = "Rewind"
Settings.Emulator.Rewind.Frequency = "Frequency"
Settings.Emulator.Rewind.Frequency.everyFrames = "Every | frames"
Settings.Emulator.Rewind.Length = "Length"
Settings.Emulator.Rewind.Length.states = "| states"
Settings.Emulator.Rewind.mute = "Mute while rewinding"
Settings.Enhancements = "Enhancements"
Settings.Enhancements.FastMode = "Fast mode"
Settings.Enhancements.RunAhead = "Run-Ahead"
Settings.Enhancements.RunAhead.Frames = "frames"
Settings.Enhancements.RunAhead.One = "One"
Settings.Enhancements.RunAhead.Two = "Two"
Settings.Enhancements.RunAhead.Three = "Three"
Settings.Enhancements.RunAhead.Four = "Four"
Settings.Enhancements.Overclocking = "Overclocking"
Settings.Enhancements.Ppu.Video = "video"
Settings.Enhancements.Ppu.Deinterlace = "Deinterlace"
Settings.Enhancements.Ppu.NoSpriteLimit = "No sprite limit"
Settings.Enhancements.hdMode7.FastPpuOnly = "fast PPU only"
Settings.Enhancements.hdMode7.Scale = "Scale"
Settings.Enhancements.hdMode7.PerspectiveCorrection = "Perspective correction"
Settings.Enhancements.hdMode7.Supersampling = "Supersampling"
Settings.Enhancements.hdMode7.HdToSdMosaic = "HD→SD Mosaic"
Settings.Enhancements.Dsp.Audio = "audio"
Settings.Enhancements.Dsp.CubicInterpolation = "Cubic interpolation"
Settings.Enhancements.Coprocessors = "Coprocessors"
Settings.Enhancements.Coprocessors.PreferHle = "Prefer high-level emulation (HLE)"
Settings.Enhancements.Coprocessors.PreferHle.tooltip = "
When checked, less accurate HLE emulation will always be used when available.
When unchecked, HLE will only be used when low-level-emulation (LLE) firmware is missing.
"
Settings.Enhancements.GameEnhancements = "Game Enhancements"
Settings.Enhancements.GameEnhancements.Hotfixes = "Hotfixes"
Settings.Enhancements.GameEnhancements.Hotfixes.tooltip = "
Even commercially licensed and officially released software sometimes shipped with bugs.
This option will correct certain issues that occurred even on real hardware.
"
Settings.Compatibility = "Compatibility"
Settings.Compatibility.entropy = "Entropy (randomization)"
Settings.Compatibility.entropy.None.tooltip = "
All memory and registers are initialized to constant values at startup.
Use this for compatibility with very old demoscene homebrew games.
"
Settings.Compatibility.entropy.Low = "Low"
Settings.Compatibility.entropy.Low.tooltip = "
All memory is randomized with repeating patterns, all registers are randomized at startup.
Use this for the most accurate representation of a real SNES.
"
Settings.Compatibility.entropy.High = "High"
Settings.Compatibility.entropy.High.tooltip = "
All memory and registers are randomized as much as possible.
Use this when developing new SNES software to ensure
maximum compatibility with real hardware.
"
Settings.Compatibility.cpu.Processor = "processor"
Settings.Compatibility.cpu.FastMath = "Fast math"
Settings.Compatibility.cpu.FastMath.tooltip = "
CPU multiplication and division take time to complete on a real SNES.
Older emulators did not simulate these delays, and provided results immediately.
Some older ROM hacks do not wait for math operations to complete and need this hack.
"
Settings.Compatibility.ppu.Video = "video"
Settings.Compatibility.ppu.NoVramBlocking = "No video-memory (VRAM) blocking"
Settings.Compatibility.ppu.NoVramBlocking.tooltip = "
This option enables emulating a bug in older releases of ZSNES and Snes9x where VRAM blocking was not emulated.
A few older ROM hacks relied on this behavior, and will render graphics incorrectly if not enabled.
Not only is this extremely inaccurate to real hardware, it also hurts the speed of the fast PPU.
Do not enable this option unless you need to play a game that works incorrectly otherwise.
"
Settings.Compatibility.dsp.Audio = "audio"
Settings.Compatibility.dsp.EchoShadowRam = "Echo shadow RAM"
Settings.Compatibility.dsp.EchoShadowRam.tooltip = "
This option enables emulating a bug in ZSNES where echo RAM was treated as separate from APU RAM.
Many older ROM hacks for “Super Mario World” relied on this behavior, and will crash without enabling this.
It is, however, extremely inaccurate to real hardware and should not be enabled unless required.
"
Settings.Drivers = "Drivers"
Settings.Drivers.Driver = "Driver"
Settings.Drivers.Change = "Change"
Settings.Drivers.Reload = "Reload"
Settings.Drivers.ExclusiveMode = "Exclusive mode"
Settings.Drivers.Synchronize = "Synchronize"
Settings.Drivers.ActiveDriver = "Active driver"
Settings.Drivers.changeConfirm.title = "Change driver?"
Settings.Drivers.changeConfirm = "
Warning: incompatible drivers may cause the application to crash.
It is highly recommended you unload your game first to be safe.
Do you wish to proceed with the driver change now anyway?
"
Settings.noteGameRestart = "Note: some settings do not take effect until reloading the game."
Settings.Drivers.Video.failedToInitialize = "Failed to initialize [|] video driver"
Settings.Drivers.Video.FullScreenMonitor = "Full-screen monitor"
Settings.Drivers.Video.FullScreenMonitor.tooltip = "Sets which monitor video is sent to in full-screen mode."
Settings.Drivers.Video.Format = "Format"
Settings.Drivers.Video.ExclusiveMode.tooltip = "
Causes full-screen mode to take over all monitors.
This allows adaptive sync to work better and reduces input latency.
However, multi-monitor users should turn this option off.
Note: Direct3D exclusive mode also does not honor the requested monitor.
"
Settings.Drivers.Video.Synchronize.tooltip = "
Waits for the video card to be ready before rendering frames.
Eliminates dropped or duplicated frames, but can distort audio.
With this option, its recommended to disable audio sync,
and enable dynamic rate control. Or alternatively, adjust
the audio skew option to reduce buffer under/overflows.
"
Settings.Drivers.Video.GpuSync = "GPU sync"
Settings.Drivers.Video.GpuSync.tooltip = "
(OpenGL driver only)
Causes the GPU to wait until frames are fully rendered.
In the best case, this can remove up to one frame of input lag.
However, it incurs a roughly 20% performance penalty.
You should disable this option unless you find it necessary.
"
Settings.Drivers.Audio.failedToInitialize = "Failed to initialize [|] audio driver"
Settings.Drivers.Audio.OutputDevice = "Output device"
Settings.Drivers.Audio.SampleRate = "Sample Rate"
Settings.Drivers.Audio.Latency = "Latency"
Settings.Drivers.Audio.ExclusiveMode.tooltip = "
(WASAPI driver only)
Acquires exclusive control of the sound card device.
This can significantly reduce audio latency.
However, it will block sounds from all other applications.
"
Settings.Drivers.Audio.Synchronize.tooltip = "
Waits for the audio card to be ready before outputting samples.
Eliminates audio distortion, but can distort video.
With this option, its recommended to disable video sync.
For best results, use this with an adaptive sync monitor.
"
Settings.Drivers.Audio.DynamicRate = "Dynamic rate"
Settings.Drivers.Audio.DynamicRate.tooltip = "
(OSS, XAudio2, waveOut drivers only)
Dynamically adjusts the audio frequency by tiny amounts.
Use this with video sync enabled, and audio sync disabled.
This can produce perfectly smooth video and clean audio,
but only if your monitor refresh rate is set correctly:
60 Hz for NTSC games, and 50 Hz for PAL games.
"
Settings.Drivers.Input.failedToInitialize = "Failed to initialize [|] input driver"
Settings.Drivers.Input.Reload.tooltip = "
A driver reload can be used to detect hotplugged devices.
This is useful for APIs that lack auto-hotplug support,
such as DirectInput and SDL.
"
Settings.Drivers.syncModePresets = "Synchronization Mode Presets"
Settings.Drivers.syncModePresets.requirements = "
Adaptive Sync: requires G-Sync or FreeSync monitor.
Dynamic Rate Control: requires monitor and SNES refresh rates to match.
"
Settings.Drivers.syncModePresets.AdaptiveSync = "Adaptive Sync"
Settings.Drivers.syncModePresets.AdaptiveSync.failure = "
Sorry, the current driver configuration is not compatible with adaptive sync mode.
Adaptive sync requires audio-synchronization support.
"
Settings.Drivers.syncModePresets.AdaptiveSync.success = "
Adaptive sync works best in exclusive full-screen mode.
Use the lowest audio latency setting your system can manage.
A G-Sync or FreeSync monitor is required.
Adaptive sync must be enabled in your driver settings panel.
"
Settings.Drivers.syncModePresets.DynamicRateControl = "Dynamic Rate Control"
Settings.Drivers.syncModePresets.DynamicRateControl.failure = "
Sorry, the current driver configuration is not compatible with the dynamic-rate-control mode.
Dynamic rate control requires video synchronization and audio-dynamic-rate support.
"
Settings.Drivers.syncModePresets.DynamicRateControl.success = "
Dynamic rate control requires your monitor to be running at:
60 Hz refresh rate for NTSC games, 50 Hz refresh rate for PAL games.
Use the lowest audio latency setting your system can manage.
"
Settings.BuiltinHotkeys.CheckAll = "Check All"
Settings.BuiltinHotkeys.UncheckAll = "Uncheck All"
Tools = "Tools"
Tools.SaveState = "Save State"
Tools.SaveState.Slot = "Slot"
Tools.SaveState.Slot.Empty = "empty"
Tools.LoadState = "Load State"
Tools.LoadState.SelectedStateSlot = "Selected state slot"
Tools.LoadState.UndoLastSave = "Undo Last Save"
Tools.LoadState.RedoLastUndo = "Redo Last Undo"
Tools.LoadState.RemoveAllStates = "Remove All States"
Tools.LoadState.RemoveAllStates.confirm.title = "Remove quick states?"
Tools.LoadState.RemoveAllStates.confirm = "Are you sure you want to permanently remove all quick states for this game?"
Tools.Speed = "Speed"
Tools.Speed.Slowest = "Slowest"
Tools.Speed.Slow = "Slow"
Tools.Speed.Normal = "Normal"
Tools.Speed.Fast = "Fast"
Tools.Speed.Fastest = "Fastest"
Tools.RunMode = "Run Mode"
Tools.RunMode.Normal = "Normal"
Tools.RunMode.PauseEmulation = "Pause Emulation"
Tools.RunMode.FrameAdvance = "Frame Advance"
Tools.Movie = "Movie"
Tools.Movie.Play = "Play"
Tools.Movie.Record = "Record"
Tools.Movie.ResetAndRecord = "Reset and Record"
Tools.Movie.Stop = "Stop"
Tools.TakeScreenshot = "Take Screenshot"
Tools.CheatFinder = "Cheat Finder"
Tools.CheatFinder.Address = "Address"
Tools.CheatFinder.Value = "Value"
Tools.CheatFinder.Scan = "Scan"
Tools.CheatFinder.All = "All"
Tools.CheatEditor = "Cheat Editor"
Tools.CheatEditor.remove.confirm.title = "Remove cheat(s)?"
Tools.CheatEditor.remove.confirm = "Are you sure you want to permanently remove the selected cheat(s)?"
Tools.CheatEditor.Codes = "Code(s)"
Tools.CheatEditor.Enable = "Enable"
Tools.CheatEditor.SelectAll = "Select All"
Tools.CheatEditor.UnselectAll = "Unselect All"
Tools.CheatEditor.AddCheats = "Add Cheats"
Tools.CheatEditor.AddCheat = "Add Cheat"
Tools.CheatEditor.EditCheat = "Edit Cheat"
Tools.CheatEditor.Edit = "Edit"
Tools.CheatEditor.FindCheats = "Find Cheats"
Tools.CheatEditor.noCheats = "Sorry, no cheats were found for this game."
Tools.CheatEditor.EnableCheats = "Enable Cheats"
Tools.CheatEditor.EnableCheats.tooltip = "
Master enable for all cheat codes.
When unchecked, no cheat codes will be active.
Use this to bypass game areas that have problems with cheats.
"
Tools.CheatEditor.EnableCheats.disabled = "All cheat codes are disabled"
Tools.CheatEditor.EnableCheats.enabled = "Active cheat codes are enabled"
Tools.CheatEditor.invalidFormat = "Invalid code(s), please only use codes in the following format"
Tools.StateManager = "State Manager"
Tools.StateManager.Category = "Category"
Tools.StateManager.Category.ManagedStates = "Managed States"
Tools.StateManager.Category.QuickStates = "Quick States"
Tools.StateManager.QuickStates.Redo = "Redo"
Tools.StateManager.QuickStates.Undo = "Undo"
Tools.StateManager.Preview = "Preview"
Tools.StateManager.AddState = "Add State"
Tools.StateManager.RenameState = "Rename State"
Tools.StateManager.remove.confirm.title = "Remove state(s)?"
Tools.StateManager.remove.confirm = "Are you sure you want to permanently remove the selected state(s)?"
Tools.ManifestViewer = "Manifest Viewer"
Tools.ManifestViewer.Manifest = "Manifest"
Game.VerifiedGameOpened = "Verified game opened"
Game.GameOpened = "Game opened"
Game.GameClosed = "Game closed"
Game.GameReset = "Game reset"
Game.AndPatchApplied = " and patch applied"
Game.GameOpeningCancelled = "Game opening cancelled"
Game.unverifiedGameWarning.title = "Unverified game image"
Game.unverifiedGameWarning = "
Warning: this game image is unverified.
Running it *may* be a security risk.
Do you wish to run the game anyway?
"
Game.unverifiedGameWarning.alwaysQuestion.title = "Disable warning?"
Game.unverifiedGameWarning.alwaysQuestion = "Do you wish to disable warning when trying to run unverified games?"
Program.Paused = "Paused"
Program.Unloaded = "Unloaded"
Program.CapturedScreenshot = "Captured screenshot"
Program.Open.MissingRequiredData = "Missing required data"
Program.Load.LoadGameBoyRom = "Load Game Boy ROM"
Program.Load.GameBoyRoms = "Game Boy ROMs"
Program.Load.LoadBsMemoryRom = "Load BS Memory ROM"
Program.Load.BsMemoryRoms = "BS Memory ROMs"
Program.Load.LoadSufamiTurboRomSlot = "Load Sufami Turbo ROM Slot"
Program.Load.SufamiTurboRoms = "Sufami Turbo ROMs"
About.Version = "Version"
About.Copyright = "Copyright"
About.License = "License"
About.Website = "Website"
About.SameBoy.description = "Super Game Boy emulator"
About.Bsnes.description = "Super Nintendo emulator"
About.Bsnes.copyright = "byuu et al"
About.Bsnes.license = "GPLv3 or later"
Browser.OpenSnesRom = "Open SNES ROM"
Browser.SnesRoms = "SNES ROMs"
Browser.AllFiles = "All Files"
Browser.Select = "Select"
Browser.SelectFolder = "Select Folder"
Browser.ChooseFolder = "Choose a folder"
Browser.ShowHidden = "Show Hidden"
Browser.OpenFile = "Open File"
Browser.OpenFiles = "Open Files"
Browser.OpenFolder = "Open Folder"
Browser.OpenObject = "Open Object"
Browser.Rename.EnterNewFolderName = "Enter the new folder name"
Browser.Rename.EnterNewFileName = "Enter the new file name"
Browser.Rename.FailedToRenameFolder = "Failed to rename folder."
Browser.Rename.FailedToRenameFile = "Failed to rename file."
Browser.Create = "Create"
Browser.Create.EnterName = "Enter a name"
Browser.CreateFolder = "Create Folder"
Browser.CreateFolder.EnterNewFolderName = "Enter a new-folder name"
Browser.Delete.DeleteSelected = "Delete Selected"
Browser.Delete.FailedToDelete = "Failed to delete |. Continue trying to remove remaining items?"
Browser.Delete.confirm = "Are you sure you want to permanently delete the |"
Browser.Delete.confirm.item = "selected item"
Browser.Delete.confirm.items = "selected items"
Browser.SaveFile = "Save File"
Browser.SaveFile.fileExists.title = "Overwrite file?"
Browser.SaveFile.fileExists = "File already exists. Overwrite it?"
StatusIcon.verifiedRom.tooltip = "
This is a known clean game image.
PCB emulation is 100% accurate.
"
StatusIcon.unverifiedRom.tooltip = "
This is not a verified game image.
PCB emulation is relying on heuristics.
"
ResetDrivers.message.title = "Reset drivers"
ResetDrivers.message = "
Hardware drivers have been reset according to the `--resetdrivers` command-line option.
Please reconfigure drivers in the “Settings” → “Drivers” window that will now open.
"
Rewind.HistoryExhausted = "Rewind history exhausted"
States.incompatibleFormat = "[|] is in incompatible format"
States.Loaded = "Loaded"
States.NotFound = "[|] not found"
States.FailedToSave = "Failed to save [|]"
States.UnableToWriteToDisk = "Unable to write [|] to disk"
States.Saved = "Saved [|]"
Patch.ipsWarning = "
(Youre seeing this prompt because IPS is a terrible patch-file format, and nobody can agree on whether SNES ROMs should be headered or not.
Please consider asking the patch author to use BPS patches instead.)
Does this IPS patch expect to be applied to a headered ROM?
If youre not sure, try “No”, and if it fails to work, try again with “Yes”.
"
Patch.ensureHeaderless = "Please ensure you are using the correct (headerless) ROM for this patch."
Movies.PlayMovie = "Play Movie"
Movies.Movies = "Movies"
Movies.playbackStarted = "Movie playback started"
Movies.playbackStopped = "Movie playback stopped"
Movies.formatNotSupported = "Movie format is not supported"
Movies.recordingStarted = "Movie recording started"
Movies.SaveMovie = "Save Movie"
Movies.MovieRecorded = "Movie recorded"
Movies.MovieNotRecorded = "Movie not recorded"
Movies.cantRecord = "Movie could not be recorded"
Devices.Gamepad = "Gamepad"
Devices.Mouse = "Mouse"
Hotkeys.ToggleMouseCapture = "Toggle Mouse Capture"
Hotkeys.ToggleCheatCodes = "Toggle Cheat Codes"
Hotkeys.Rewind = "Rewind"
Hotkeys.LoadUndoState = "Load Undo State"
Hotkeys.LoadRedoState = "Load Redo State"
Hotkeys.DecrementStateSlot = "Decrement State Slot"
Hotkeys.IncrementStateSlot = "Increment State Slot"
Hotkeys.FastForward = "Fast Forward"
Hotkeys.FrameAdvance = "Frame Advance"
Hotkeys.DecreaseHDMode7 = "Decrease HD Mode 7"
Hotkeys.IncreaseHDMode7 = "Increase HD Mode 7"
Hotkeys.ToggleSupersampling = "Toggle Supersampling"
Hotkeys.ResetEmulation = "Reset Emulation"
Hotkeys.QuitEmulator = "Quit Emulator"

View file

@ -0,0 +1,48 @@
Common.Yes = "Si"
Common.No = "No"
Common.Cancel = "Cancella"
Common.Always = "Sempre"
Common.AreYouSure = "Sei sicuro?"
Common.Open = "Apri"
Common.Load = "Carica"
Common.Save = "Salva"
Common.Add = "Aggiungi"
Common.Remove = "Rimuovi"
Common.Delete = "Cancella"
Common.Rename = "Rinomina"
Common.Reset = "Resetta"
Common.Clear = "Pulisci"
Common.None = "Niente"
Common.Disabled = "Disabilita"
Common.Default = "Predefinito"
Common.Name = "Nome"
Common.Date = "Data"
Common.Success = "Successo"
Common.Failure = "Fallito"
Common.Error = "Errore"
Common.Warning = "Attenzione"
Common.Auto = "Automatico"
Common.Video = "Video"
Common.Audio = "Audio"
Common.Fps = "FPS"
Common.Hz = "Hz"
Common.number = "#"
Menu.File = "File"
Menu.File.OpenGame = "Apri un Gioco"
Menu.File.OpenRecentGame = "Apri un gioco lanciato di recente"
Menu.File.OpenRecentGame.ClearList = "Pulisci Lista"
Menu.File.OpenRecentGame.NoRecentGames = "Nessun Gioco Recente"
Menu.File.CloseGame = "Chiudi Gioco"
Menu.File.Exit = "Esci"
Menu.System = "Sistema"
Menu.System.ControllerPort = "Porta del Controller"
Menu.System.ExpansionPort = "Espansione della Porta"
Menu.Settings.Size = "Dimensione"
Menu.Settings.Size.ShrinkWindowToSize = "Riduci la finestra alle dimensioni"
Menu.Settings.Size.CenterWindow = "Finestra centrata"
Menu.Settings.Size.FullScreenMode = "Modalità Schermo intero"
Menu.Settings.Size.PseudoFullScreenMode = "Modalità Pseudo schermo intero"
Menu.Settings.Output = "Output"

View file

@ -0,0 +1,42 @@
Common.Yes = "はい"
Common.No = "いいえ"
Common.Cancel = "キャンセル"
Common.Open = "開く"
Common.Save = "保存"
Common.Reset = "リセット"
Common.None = "なし"
Menu.File.OpenGame = "ゲームを読み込み"
Menu.File.OpenRecentGame = "最新ゲームを読み込み"
Menu.File.OpenRecentGame.ClearList = "全部を消す"
Menu.File.CloseGame = "ゲームをアンロード"
Menu.File.Exit = "終了"
Menu.System = "システム"
Menu.System.ControllerPort = "コントローラポート"
Menu.System.ExpansionPort = "拡張ポート"
Menu.Help = "ヘルプ"
Menu.Help.About = "| について"
Settings = "設定"
Tools = "ツール"
Tools.SaveState.Slot.Empty = "なし"
Program.Paused = "ポーズ"
Program.Unloaded = "アンロードされる"
About.Version = "バージョン"
About.License = "ライセンス"
About.Website = "公式サイト"
Browser.Select = "選択"
Devices.Gamepad = "ゲームパッド"
Devices.Mouse = "マウス"
Devices.SuperMultitap = "スーパーマルチタップ"
Devices.SuperScope = "スーパースコップ"}
Devices.Justifier = "1挺のジャスティファイアー"
Devices.Justifiers = "2挺のジャスティファイアー"
Devices.Satellaview = "サテラビュー"

View file

@ -0,0 +1,620 @@
Common.Yes = "Да"
Common.No = "Нет"
Common.Cancel = "Отмена"
Common.Always = "Всегда"
Common.AreYouSure = "Вы уверены?"
Common.Open = "Открыть"
Common.Load = "Загрузить"
Common.Save = "Сохранить"
Common.Add = "Добавить"
Common.Remove = "Удалить"
Common.Delete = "Удалить"
Common.Rename = "Переименовать"
Common.Reset = "Сброс"
Common.Clear = "Очистить"
Common.None = "Нет"
Common.Disabled = "Отключено"
Common.Default = "По умолчанию"
Common.Name = "Название"
Common.Date = "Дата"
Common.Success = "Успех"
Common.Failure = "Неудача"
Common.Error = "Ошибка"
Common.Warning = "Внимание"
Common.Auto = "Авто"
Common.Video = "Видео"
Common.Audio = "Звук"
Common.Fps = "к/с"
Common.Hz = "Гц"
Common.number = "№"
Menu.File = "Файл"
Menu.File.OpenGame = "Открыть игру"
Menu.File.OpenRecentGame = "Открыть недавнюю игру"
Menu.File.OpenRecentGame.ClearList = "Очистить список"
Menu.File.OpenRecentGame.ClearList.confirm.title = "Очистить список недавних игр?"
Menu.File.OpenRecentGame.ClearList.confirm = "Вы уверены, что хотите очистить список недавних игр?"
Menu.File.OpenRecentGame.NoRecentGames = "Нет недавних игр"
Menu.File.CloseGame = "Закрыть игру"
Menu.File.Exit = "Выход"
Menu.System = "Система"
Menu.System.ControllerPort = "Порт контроллера"
Menu.System.ExpansionPort = "Порт расширения"
Menu.Settings.Size = "Размер"
Menu.Settings.Size.ShrinkWindowToSize = "Подогнать окно под размер"
Menu.Settings.Size.CenterWindow = "Центрировать окно"
Menu.Settings.Size.FullScreenMode = "Полноэкранный режим"
Menu.Settings.Size.PseudoFullScreenMode = "Псевдополноэкранный режим"
Menu.Settings.Output = "Изображение"
Menu.Settings.Output.Center = "По центру"
Menu.Settings.Output.PixelPerfect = "Целочисленное масштабирование"
Menu.Settings.Output.Scale = "Масштабирование с сохранением пропорций"
Menu.Settings.Output.Stretch = "Растяжение без сохранения пропорций"
Menu.Settings.Output.AspectRatioCorrection = "Коррекция соотношения сторон"
Menu.Settings.Output.ShowOverscanArea = "Показать область «overscan»"
Menu.Settings.Output.scalingInfo = "Информация о масштабировании в строке состояния"
Menu.Settings.Output.HiresBlurEmulation = "Эмуляция размытия в режиме высокого разрешения"
Menu.Settings.Filter = "Фильтр"
Menu.Settings.Shader = "Шейдер"
Menu.Settings.Shader.Blur = "Размытие"
Menu.Settings.MuteAudio = "Выключить звук"
Menu.Settings.ShowStatusBar = "Показать строку состояния"
Menu.Settings.OpenSettingsFolder = "Открыть папку настроек"
Menu.Help = "Справка"
Menu.Help.About = "О программе |"
Settings = "Настройки"
Settings.Common.Assign = "Задать"
Settings.Common.AssignLowercase = "задать"
Settings.Common.Mapping = "Привязка"
Settings.Common.MappingAssigned = "Привязка задана."
Settings.Common.PressKeyOrButtonForMapping = "Нажмите клавишу или кнопку для привязки"
Settings.Common.FrameLowercase = "кадр"
Settings.Video.ColorAdjustment = "Настройка цвета"
Settings.Video.Luminance = "Яркость"
Settings.Video.Saturation = "Насыщенность"
Settings.Video.Gamma = "Контрастность"
Settings.Video.DimVideoWhenIdle = "Затемнять изображение при простое"
Settings.Video.DimVideoWhenIdle.tooltip = "Затемняет изображение, чтобы показать, что эмуляция приостановлена."
Settings.Video.DrawSnowEffectWhenIdle = "Применять эффект снега при простое"
Settings.Audio.Effects = "Эффекты"
Settings.Audio.Skew = "Частота"
Settings.Audio.Skew.tooltip = "
Изменяет частоту дискретизации на заданную величину (в Гц).
По сути это статическое управление частотой.
Сначала включите синхронизацию как для видео, так и для звука.
Затем попробуйте увеличить или уменьшить это значение для уменьшения ошибок.
Изменение в одном направлении положительно скажется на видео, но отрицательно — на звуке.
Изменение в другом направлении приведёт к обратному результату.
Смысл в том, чтобы найти наилучший компромисс.
При динамическом управлении частотой используйте значение 0.
"
Settings.Audio.Volume = "Громкость"
Settings.Audio.Volume.tooltip = "
Изменяет громкость звука.
По возможности не следует использовать значения выше 100%!
В противном случае возможны искажения из-за превышения максимально возможного уровня.
"
Settings.Audio.Balance = "Панорама"
Settings.Audio.Balance.tooltip = "
Панорамирует звук влево (меньшие значения) или вправо (более высокие значения).
Рекомендуемое значение — 50% (по центру).
"
Settings.Audio.MuteWhenUnfocused = "Отключать звук при неактивном окне программы"
Settings.Input = "Устройства ввода"
Settings.Input.WhenFocusIsLost = "При неактивном окне программы"
Settings.Input.WhenFocusIsLost.PauseEmulation = "Приостановить эмуляцию"
Settings.Input.WhenFocusIsLost.BlockInput = "Блокировать ввод"
Settings.Input.WhenFocusIsLost.AllowInput = "Разрешить ввод"
Settings.Input.Port = "Порт"
Settings.Input.Device = "Устройство"
Settings.Input.TurboRate = "Частота турбо"
Settings.Input.TurboRate.tooltip = "Количество кадров между срабатываниями турбо-кнопок."
Settings.Input.MouseLeft = "Левая кнопка мыши"
Settings.Input.MouseMiddle = "Средняя кнопка мыши"
Settings.Input.MouseRight = "Правая кнопка мыши"
Settings.Input.MouseXAxis = "Мышь по оси X"
Settings.Input.MouseYAxis = "Мышь по оси Y"
Settings.Hotkeys = "Горячие клавиши"
Settings.Hotkeys.CombinationalLogic = "Комбинационная логика"
Settings.Hotkeys.CombinationalLogic.tooltip = "
Определяет, все или любое из соответствий требуется нажать для активации горячих клавиш.
Используйте логику «И», если для активации горячих клавиш вам нужны такие сочетания клавиш, как Ctrl+F.
Используйте логику «ИЛИ», если для активации одних и тех же горячих клавиш вы хотите использовать как клавиатуру, так и геймпад.
"
Settings.Hotkeys.CombinationalLogic.And = "И"
Settings.Hotkeys.CombinationalLogic.And.tooltip = "Для активации заданных горячих клавиш требуется нажать все соответствия."
Settings.Hotkeys.CombinationalLogic.Or = "ИЛИ"
Settings.Hotkeys.CombinationalLogic.Or.tooltip = "Для активации заданных горячих клавиш можно нажать любое из соответствий."
Settings.Hotkeys.Rewind.enableFirst = "Пожалуйста, сначала включите поддержку перемотки: «Настройки» → «Эмулятор»"
Settings.BuiltinHotkeys = "Горячие клавиши (встроенные)"
Settings.Paths = "Пути"
Settings.Paths.Games = "Игры"
Settings.Paths.Patches = "Патчи"
Settings.Paths.Saves = "Сохранения"
Settings.Paths.Cheats = "Читы"
Settings.Paths.States = "Быстрые сохранения"
Settings.Paths.Screenshots = "Скриншоты"
Settings.Paths.LastRecentlyUsed = "последняя использованная папка"
Settings.Paths.SameAsLoadedGame = "папка текущей игры"
Settings.Emulator = "Эмулятор"
Settings.Emulator.General = "Общие"
Settings.Emulator.General.warnOnUnverifiedGames = "Предупреждать при открытии непроверенных игр"
Settings.Emulator.General.autoSaveMemory = "Периодически сохранять память"
Settings.Emulator.General.autoSaveStateOnUnload = "Сохранять состояние отмены действия при закрытии игр"
Settings.Emulator.General.AutoResumeOnLoad = "Возобновлять при загрузке"
Settings.Emulator.General.UseNativeFileDialogs = "Использовать стандартные окна открытия/сохранения файлов"
Settings.Emulator.FastForward = "Перемотка вперёд (Fast Forward)"
Settings.Emulator.FastForward.FrameSkip = "Пропуск кадров"
Settings.Emulator.FastForward.FrameSkip.tooltip = "
Задаёт, сколько кадров пропускать при перемотке вперёд.
Пропуск кадров позволяет увеличить скорость перемотки.
"
Settings.Emulator.FastForward.FrameSkip.Frames2to4 = "| кадра"
Settings.Emulator.FastForward.FrameSkip.Frames = "| кадров"
Settings.Emulator.FastForward.Limiter = "Ограничение"
Settings.Emulator.FastForward.Limiter.tooltip = "Задаёт максимальную скорость при перемотке вперёд."
Settings.Emulator.FastForward.mute = "Отключать звук при перемотке вперёд"
Settings.Emulator.Rewind = "Перемотка назад (Rewind)"
Settings.Emulator.Rewind.Frequency = "Частота"
Settings.Emulator.Rewind.Frequency.everyFrames = "Каждые | кадров"
Settings.Emulator.Rewind.Length = "Длина"
Settings.Emulator.Rewind.Length.states = "| состояний"
Settings.Emulator.Rewind.mute = "Отключать звук при перемотке назад"
Settings.Enhancements = "Улучшения"
Settings.Enhancements.FastMode = "Быстрый режим"
Settings.Enhancements.RunAhead = "Опережающая эмуляция (Run-Ahead)"
Settings.Enhancements.RunAhead.Frames = "кадра"
Settings.Enhancements.RunAhead.One = "Один"
Settings.Enhancements.RunAhead.Two = "Два"
Settings.Enhancements.RunAhead.Three = "Три"
Settings.Enhancements.RunAhead.Four = "Четыре"
Settings.Enhancements.Overclocking = "Разгон"
Settings.Enhancements.Ppu.Video = "видео"
Settings.Enhancements.Ppu.Deinterlace = "Устранение чересстрочности"
Settings.Enhancements.Ppu.NoSpriteLimit = "Не ограничивать количество спрайтов"
Settings.Enhancements.hdMode7.FastPpuOnly = "только в быстром режиме PPU"
Settings.Enhancements.hdMode7.Scale = "Масштаб"
Settings.Enhancements.hdMode7.PerspectiveCorrection = "Коррекция перспективы"
Settings.Enhancements.hdMode7.Supersampling = "Избыточная выборка"
Settings.Enhancements.hdMode7.HdToSdMosaic = "Мозаичность HD→SD"
Settings.Enhancements.Dsp.Audio = "звук"
Settings.Enhancements.Dsp.CubicInterpolation = "Кубическая интерполяция"
Settings.Enhancements.Coprocessors = "Сопроцессоры"
Settings.Enhancements.Coprocessors.PreferHle = "Предпочитать высокоуровневую эмуляцию (HLE)"
Settings.Enhancements.Coprocessors.PreferHle.tooltip = "
Когда включено, менее точная высокоуровневая эмуляция будет использоваться всегда, когда возможно.
Когда выключено, высокоуровневая эмуляция будет использоваться только при отсутствии низкоуровневой (LLE) прошивки.
"
Settings.Enhancements.GameEnhancements = "Улучшения игр"
Settings.Enhancements.GameEnhancements.Hotfixes = "Исправления ошибок"
Settings.Enhancements.GameEnhancements.Hotfixes.tooltip = "
Даже в коммерчески лицензированных и официально выпущенных программах иногда есть ошибки.
Этот параметр исправит определённые проблемы, которые имели место на реальном оборудовании.
"
Settings.Compatibility = "Совместимость"
Settings.Compatibility.entropy = "Энтропия (степень случайности)"
Settings.Compatibility.entropy.None.tooltip = "
При запуске вся память и регистры устанавливаются в постоянные значения.
Используйте этот вариант для совместимости с очень старыми самодельными играми демосцены.
"
Settings.Compatibility.entropy.Low = "Низкая"
Settings.Compatibility.entropy.Low.tooltip = "
При запуске вся память заполняется повторяющимися случайными значениями, все регистры устанавливаются в случайные значения.
Используйте этот вариант для наиболее точного соответствия реальной SNES.
"
Settings.Compatibility.entropy.High = "Высокая"
Settings.Compatibility.entropy.High.tooltip = "
Вся память и регистры устанавливаются в максимально случайные значения.
Используйте этот вариант при разработке новых программ для SNES,
чтобы гарантировать максимальную совместимость с реальным оборудованием.
"
Settings.Compatibility.cpu.Processor = "процессор"
Settings.Compatibility.cpu.FastMath = "Быстрая математика"
Settings.Compatibility.cpu.FastMath.tooltip = "
На реальной SNES умножение и деление средствами процессора занимает время.
Старые эмуляторы не учитывали эти задержки и возвращали результат сразу.
Этот параметр нужен некоторым старым ROM-хакам, которые не ждали завершения математических операций.
"
Settings.Compatibility.ppu.Video = "видео"
Settings.Compatibility.ppu.NoVramBlocking = "Не блокировать видеопамять (VRAM)"
Settings.Compatibility.ppu.NoVramBlocking.tooltip = "
Этот параметр включает эмуляцию ошибки старых версий ZSNES and Snes9x, где не было эмуляции блокировки видеопамяти.
Некоторые старые ROM-хаки рассчитывали на это поведение и будут отрисовываться неправильно, если этот параметр не включить.
Это не только сильно отличается от поведения реального оборудования, но и снижает быстродействие быстрого PPU.
Не включайте этот параметр, если вам не требуется поиграть в игру, в противном случае работающую неправильно.
"
Settings.Compatibility.dsp.Audio = "звук"
Settings.Compatibility.dsp.EchoShadowRam = "Отображать теневую память (echo shadow RAM)"
Settings.Compatibility.dsp.EchoShadowRam.tooltip = "
Этот параметр включает эмуляцию ошибки ZSNES, где отображаемая память (echo RAM) рассматривалась отдельно от памяти APU.
Многие старые ROM-хаки «Super Mario World» рассчитывали на это поведение и не будут работать без включения этого параметра.
Однако это сильно отличается от поведения реального оборудования, и не следует включать этот параметр без необходимости.
"
Settings.Drivers = "Драйверы"
Settings.Drivers.Driver = "Драйвер"
Settings.Drivers.Change = "Изменить"
Settings.Drivers.Reload = "Перезагрузить"
Settings.Drivers.ExclusiveMode = "Эксклюзивный режим"
Settings.Drivers.Synchronize = "Синхронизация"
Settings.Drivers.ActiveDriver = "Активный драйвер"
Settings.Drivers.changeConfirm.title = "Изменить драйвер?"
Settings.Drivers.changeConfirm = "
Внимание: несовместимые драйверы могут привести к невозможности работы программы.
Для безопасности настоятельно рекомендуется сначала закрыть вашу игру.
Хотите ли вы изменить драйвер в любом случае?
"
Settings.noteGameRestart = "Примечание: некоторые настройки применяются только после перезагрузки игры."
Settings.Drivers.Video.failedToInitialize = "Не удалось инициализировать видеодрайвер [|]"
Settings.Drivers.Video.FullScreenMonitor = "Монитор для полноэкранного режима"
Settings.Drivers.Video.FullScreenMonitor.tooltip = "Задаёт, на какой монитор выводится изображение в полноэкранном режиме."
Settings.Drivers.Video.Format = "Формат"
Settings.Drivers.Video.ExclusiveMode.tooltip = "
Приводит к тому, что в полноэкранном режиме изображение занимает все мониторы.
Улучшает работу адаптивной синхронизации (adaptive sync) и уменьшает задержку ввода.
Однако пользователям многомониторных конфигураций имеет смысл отключить этот параметр.
Примечание: для Direct3D в эксклюзивном режиме также не учитывается выбранный монитор.
"
Settings.Drivers.Video.Synchronize.tooltip = "
Ожидает готовности видеокарты перед отрисовкой кадров.
Устраняет пропуск или повторение кадров, но может искажать звук.
При использовании этого параметра рекомендуется отключить синхронизацию
звука и включить динамическое управление частотой. Как вариант,
подстройте звуковой параметр «Частота» для снижения вероятности
опустошения или переполнения буфера.
"
Settings.Drivers.Video.GpuSync = "Синхронизация GPU"
Settings.Drivers.Video.GpuSync.tooltip = "
(Только для драйвера OpenGL)
Заставляет видеокарту ожидать, пока кадры не будут полностью отрисованы.
В лучшем случае это может устранить до одного кадра задержки ввода.
Однако при этом быстродействие снижается примерно на 20%.
Следует отключить этот параметр, если он вам не требуется.
"
Settings.Drivers.Audio.failedToInitialize = "Не удалось инициализировать аудиодрайвер [|]"
Settings.Drivers.Audio.OutputDevice = "Устройство вывода"
Settings.Drivers.Audio.SampleRate = "Частота дискретизации"
Settings.Drivers.Audio.Latency = "Задержка"
Settings.Drivers.Audio.ExclusiveMode.tooltip = "
(Только для драйвера WASAPI)
Включает исключительный доступ к звуковой карте.
Это может существенно снизить задержку вывода звука.
Однако звуки от всех других приложений заблокируются.
"
Settings.Drivers.Audio.Synchronize.tooltip = "
Ожидает готовности звуковой карты перед выводом звука.
Устраняет искажения звука, но может искажать видео.
При использовании этого параметра рекомендуется отключить синхронизацию видео.
Для наилучших результатов используйте этот параметр
с монитором, поддерживающим адаптивную синхронизацию.
"
Settings.Drivers.Audio.DynamicRate = "Динамическая частота"
Settings.Drivers.Audio.DynamicRate.tooltip = "
(Только для драйверов OSS, XAudio2, waveOut)
Динамически подстраивает частоту звука на небольшие величины.
Используйте при включённой синхронизации видео
и отключённой синхронизации звука.
Может обеспечить идеально плавное видео и чистый звук,
но только при правильно установленной частоте обновления монитора:
60 Гц для игр NTSC и 50 Гц для игр PAL.
"
Settings.Drivers.Input.failedToInitialize = "Не удалось инициализировать драйвер устройства ввода [|]"
Settings.Drivers.Input.Reload.tooltip = "
Перезагрузку драйвера можно использовать для обнаружения
устройств, подключённых в «горячем» режиме.
Полезно для программных интерфейсов (API), не поддерживающих
«горячее» подключение, таких как DirectInput и SDL.
"
Settings.Drivers.syncModePresets = "Предустановки режимов синхронизации"
Settings.Drivers.syncModePresets.requirements = "
Адаптивная синхронизация: требуется монитор с поддержкой G-Sync или FreeSync.
Динамическое управление частотой: частоты обновления монитора и SNES должны совпадать.
"
Settings.Drivers.syncModePresets.AdaptiveSync = "Адаптивная синхронизация"
Settings.Drivers.syncModePresets.AdaptiveSync.failure = "
Извините, текущая конфигурация драйверов несовместима с режимом адаптивной синхронизации.
Для адаптивной синхронизации требуется поддержка синхронизации звука.
"
Settings.Drivers.syncModePresets.AdaptiveSync.success = "
Адаптивная синхронизация лучше всего работает в эксклюзивном полноэкранном режиме.
Используйте минимальную задержку звука, которая возможна на вашей системе.
Требуется монитор с поддержкой G-Sync или FreeSync.
Требуется включить адаптивную синхронизацию в панели управления вашего видеодрайвера.
"
Settings.Drivers.syncModePresets.DynamicRateControl = "Динамическое управление частотой"
Settings.Drivers.syncModePresets.DynamicRateControl.failure = "
Извините, текущая конфигруация драйверов несовместима с режимом динамического управления частотой.
Для динамического управления частотой требуется поддержка вертикальной синхронизации и динамического изменения частоты звука.
"
Settings.Drivers.syncModePresets.DynamicRateControl.success = "
Для динамического управления частотой требуется, чтобы частота обновления вашего монитора была:
60 Гц для игр NTSC, 50 Гц для игр PAL.
Используйте минимальную задержку звука, которая возможна на вашей системе.
"
Settings.BuiltinHotkeys.CheckAll = "Включить всё"
Settings.BuiltinHotkeys.UncheckAll = "Выключить всё"
Tools = "Инструменты"
Tools.SaveState = "Сохранить состояние"
Tools.SaveState.Slot = "Слот"
Tools.SaveState.Slot.Empty = "пусто"
Tools.LoadState = "Загрузить состояние"
Tools.LoadState.SelectedStateSlot = "Выбран слот быстрого сохранения"
Tools.LoadState.UndoLastSave = "Отменить последнее сохранение"
Tools.LoadState.RedoLastUndo = "Вернуть последнее отменённое сохранение"
Tools.LoadState.RemoveAllStates = "Удалить все сохранения"
Tools.LoadState.RemoveAllStates.confirm.title = "Удалить быстрые сохранения?"
Tools.LoadState.RemoveAllStates.confirm = "Вы уверены, что хотите навсегда удалить все быстрые сохранения для этой игры?"
Tools.Speed = "Скорость"
Tools.Speed.Slowest = "Очень медленно"
Tools.Speed.Slow = "Медленно"
Tools.Speed.Normal = "Обычная скорость"
Tools.Speed.Fast = "Быстро"
Tools.Speed.Fastest = "Очень быстро"
Tools.RunMode = "Режим исполнения"
Tools.RunMode.Normal = "Обычный"
Tools.RunMode.PauseEmulation = "Приостановить эмуляцию"
Tools.RunMode.FrameAdvance = "Покадрово (Frame Advance)"
Tools.Movie = "Видеозапись"
Tools.Movie.Play = "Воспроизведение"
Tools.Movie.Record = "Запись"
Tools.Movie.ResetAndRecord = "Сброс и запись"
Tools.Movie.Stop = "Стоп"
Tools.TakeScreenshot = "Снять скриншот"
Tools.CheatFinder = "Поиск читов"
Tools.CheatFinder.Address = "Адрес"
Tools.CheatFinder.Value = "Значение"
Tools.CheatFinder.Scan = "Сканировать"
Tools.CheatFinder.All = "Все"
Tools.CheatEditor = "Редактор читов"
Tools.CheatEditor.remove.confirm.title = "Удалить читы?"
Tools.CheatEditor.remove.confirm = "Вы уверены, что хотите навсегда удалить выделенные читы?"
Tools.CheatEditor.Codes = "Код(ы)"
Tools.CheatEditor.Enable = "Включить"
Tools.CheatEditor.SelectAll = "Выделить всё"
Tools.CheatEditor.UnselectAll = "Снять выделение"
Tools.CheatEditor.AddCheats = "Добавить читы"
Tools.CheatEditor.AddCheat = "Добавить чит"
Tools.CheatEditor.EditCheat = "Изменить чит"
Tools.CheatEditor.Edit = "Изменить"
Tools.CheatEditor.FindCheats = "Найти читы"
Tools.CheatEditor.noCheats = "К сожалению, читы для этой игры не найдены."
Tools.CheatEditor.EnableCheats = "Включить читы"
Tools.CheatEditor.EnableCheats.tooltip = "
Включает все чит-коды.
Когда выключено, ни один чит-код не будет активен.
Используйте при прохождении частей игр, где читы приводят к проблемам.
"
Tools.CheatEditor.EnableCheats.disabled = "Все чит-коды выключены"
Tools.CheatEditor.EnableCheats.enabled = "Активные чит-коды включены"
Tools.CheatEditor.invalidFormat = "Некорректный код(ы), пожалуста, используйте следующий формат"
Tools.StateManager = "Менеджер сохранений"
Tools.StateManager.Category = "Категория"
Tools.StateManager.Category.ManagedStates = "Управляемые состояния"
Tools.StateManager.Category.QuickStates = "Быстрые сохранения"
Tools.StateManager.QuickStates.Redo = "Вернуть"
Tools.StateManager.QuickStates.Undo = "Отменить"
Tools.StateManager.Preview = "Предпросмотр"
Tools.StateManager.AddState = "Добавить состояние"
Tools.StateManager.RenameState = "Переименовать состояние"
Tools.StateManager.remove.confirm.title = "Удалить сохранения?"
Tools.StateManager.remove.confirm = "Вы уверены, что хотите навсегда удалить выделенные сохранения?"
Tools.ManifestViewer = "Просмотр манифеста"
Tools.ManifestViewer.Manifest = "Манифест"
Game.VerifiedGameOpened = "Открыта проверенная игра"
Game.GameOpened = "Открыта игра"
Game.GameClosed = "Закрыта игра"
Game.GameReset = "Игра сброшена"
Game.AndPatchApplied = ", и применён патч"
Game.GameOpeningCancelled = "Открытие игры отменено"
Game.unverifiedGameWarning.title = "Непроверенный образ игры"
Game.unverifiedGameWarning = "
Внимание: этот образ игры не проверен.
Запуск игры *может* быть небезопасным.
Хотите ли вы запустить игру в любом случае?
"
Game.unverifiedGameWarning.alwaysQuestion.title = "Отключить предупреждение?"
Game.unverifiedGameWarning.alwaysQuestion = "Отключить предупреждение при запуске непроверенных игр?"
Program.Paused = "Пауза"
Program.Unloaded = "Простой"
Program.CapturedScreenshot = "Снят скриншот"
Program.Open.MissingRequiredData = "Отсутствуют необходимые данные"
Program.Load.LoadGameBoyRom = "Загрузить игру Game Boy"
Program.Load.GameBoyRoms = "Игры Game Boy"
Program.Load.LoadBsMemoryRom = "Загрузить образ BS-памяти"
Program.Load.BsMemoryRoms = "Образы BS-памяти"
Program.Load.LoadSufamiTurboRomSlot = "Загрузить игру Sufami Turbo — слот"
Program.Load.SufamiTurboRoms = "Игры Sufami Turbo"
About.Version = "Версия"
About.Copyright = "Авторские права"
About.License = "Лицензия"
About.Website = "Сайт"
About.SameBoy.description = "Эмулятор Super Game Boy"
About.Bsnes.description = "Эмулятор Super Nintendo"
About.Bsnes.copyright = "byuu и другие"
About.Bsnes.license = "GPLv3 или новее"
Browser.OpenSnesRom = "Открыть игру SNES"
Browser.SnesRoms = "Игры SNES"
Browser.AllFiles = "Все файлы"
Browser.Select = "Выбрать"
Browser.SelectFolder = "Выбрать папку"
Browser.ChooseFolder = "Выберите папку"
Browser.ShowHidden = "Показать скрытые"
Browser.OpenFile = "Открыть файл"
Browser.OpenFiles = "Открыть файлы"
Browser.OpenFolder = "Открыть папку"
Browser.OpenObject = "Открыть объект"
Browser.Rename.EnterNewFolderName = "Введите новое имя папки"
Browser.Rename.EnterNewFileName = "Введите новое имя файла"
Browser.Rename.FailedToRenameFolder = "Не удалось переименовать папку."
Browser.Rename.FailedToRenameFile = "Не удалось переименовать файл."
Browser.Create = "Создать"
Browser.Create.EnterName = "Введите имя"
Browser.CreateFolder = "Создать папку"
Browser.CreateFolder.EnterNewFolderName = "Введите имя новой папки"
Browser.Delete.DeleteSelected = "Удалить выделенные"
Browser.Delete.FailedToDelete = "Не удалось удалить |. Попытаться удалить остальные элементы?"
Browser.Delete.confirm = "Вы уверены, что хотите навсегда удалить |"
Browser.Delete.confirm.item = "выделенный элемент"
Browser.Delete.confirm.items = "выделенные элементы"
Browser.SaveFile = "Сохранить файл"
Browser.SaveFile.fileExists.title = "Заменить файл?"
Browser.SaveFile.fileExists = "Файл уже существует. Заменить его?"
StatusIcon.verifiedRom.tooltip = "
Это известный качественный образ игры.
Эмуляция платы (PCB) на 100% точная.
"
StatusIcon.unverifiedRom.tooltip = "
Этот образ игры не проверен.
При эмуляции платы (PCB) будет использоваться эвристика.
"
ResetDrivers.message.title = "Сброс драйверов"
ResetDrivers.message = "
Драйверы оборудования были сброшены согласно параметру командной строки `--resetdrivers`.
Пожалуйста, выберите новые настройки драйверов в окне «Настройки» → «Драйверы», которое сейчас откроется.
"
Rewind.HistoryExhausted = "История перемотки исчерпана"
States.incompatibleFormat = "[|] имеет несовместимый формат"
States.Loaded = "Загружено"
States.NotFound = "[|] не найдено"
States.FailedToSave = "Не удалось сохранить [|]"
States.UnableToWriteToDisk = "Не удаётся записать [|] на диск"
States.Saved = "Сохранено [|]"
Patch.ipsWarning = "
(Вы видите этот запрос потому, что IPS — ужасный формат файлов патчей, и нет единого мнения, должны ли SNES-игры снабжаться заголовками.
Пожалуйста, попробуйте попросить автора патча использовать формат BPS.)
Предусмотрена ли в этом IPS-патче возможность применения к игре с заголовком?
Если вы не уверены, попробуйте «Нет», а если не сработает, попробуйте снова с ответом «Да».
"
Patch.ensureHeaderless = "Пожалуйста, удостоверьтесь, что используете для этого патча правильный (без заголовка) образ."
Movies.PlayMovie = "Воспроизвести видео"
Movies.Movies = "Видеозаписи"
Movies.playbackStarted = "Началось воспроизведение видео"
Movies.playbackStopped = "Воспроизведение видео остановлено"
Movies.formatNotSupported = "Формат видео не поддерживается"
Movies.recordingStarted = "Началась запись видео"
Movies.SaveMovie = "Сохранить видео"
Movies.MovieRecorded = "Видео записано"
Movies.MovieNotRecorded = "Видео не записано"
Movies.cantRecord = "Не удаётся записать видео"
Devices.Gamepad = "Геймпад"
Devices.Mouse = "Мышь"
Hotkeys.ToggleMouseCapture = "Захватить указатель мыши"
Hotkeys.ToggleCheatCodes = "Включить чит-коды"
Hotkeys.Rewind = "Перемотать назад (Rewind)"
Hotkeys.LoadUndoState = "Загрузить состояние отмены действия"
Hotkeys.LoadRedoState = "Загрузить состояния повтора действия"
Hotkeys.DecrementStateSlot = "Предыдущий слот быстрого сохранения"
Hotkeys.IncrementStateSlot = "Следующий слот быстрого сохранения"
Hotkeys.FastForward = "Перемотать вперёд (Fast Forward)"
Hotkeys.FrameAdvance = "Следующий кадр в покадровом режиме"
Hotkeys.DecreaseHDMode7 = "Уменьшить разрешение HD Mode 7"
Hotkeys.IncreaseHDMode7 = "Увеличить разрешение HD Mode 7"
Hotkeys.ToggleSupersampling = "Включить избыточную выборку"
Hotkeys.ResetEmulation = "Сбросить эмуляцию"
Hotkeys.QuitEmulator = "Выйти из эмулятора"

View file

@ -1,33 +1,11 @@
/*! bsnes-mt by Marat Tanalin | http://tanalin.com/en/projects/bsnes-mt/ */
#include <memory>
#include "pizza-png/src/Image.h"
#include "app.h"
#include "windows.h"
#include "strings.h"
#include "utils.h"
namespace bsnesMt {
using std::make_unique;
auto utf8ToWideString(const string &utf8) -> wstring {
wstring wide;
auto utf8c = utf8.data();
int size = MultiByteToWideChar(CP_UTF8, 0, utf8c, -1, 0, 0);
if (size > 0) {
auto buffer = make_unique<wchar_t[]>(size);
MultiByteToWideChar(CP_UTF8, 0, utf8c, -1, buffer.get(), size);
wide = buffer.get();
}
return wide;
}
auto getTime() -> SYSTEMTIME {
SYSTEMTIME time;
GetLocalTime(&time);
@ -39,67 +17,7 @@ auto open(const wstring &path) -> void {
}
auto open(const string &path) -> void {
open(utf8ToWideString(path));
}
auto saveFile(const string &data, const string &path) -> bool {
HANDLE handle = CreateFileW(utf8ToWideString(path).data(), GENERIC_WRITE, 0,
NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
if (INVALID_HANDLE_VALUE == handle) {
return false;
}
DWORD bytesToWrite = data.size();
DWORD bytesWritten = 0;
BOOL errorFlag = WriteFile(handle, data.data(), bytesToWrite, &bytesWritten, NULL);
if (FALSE == errorFlag || bytesWritten != bytesToWrite) {
return false;
}
CloseHandle(handle);
return true;
}
auto saveBgraArrayAsPngImage(uint8_t* data, uint16_t width, uint16_t height, const string &path) -> bool {
MaratTanalin::PizzaPNG::Image image(width, height);
size_t pixelCount = width * height;
for (size_t i = 0; i < pixelCount; i++) {
size_t blueIndex = i << 2;
image.addPixel(data[blueIndex + 2], data[blueIndex + 1], data[blueIndex]);
}
image.insertChunk(ucharVectorToString(app::pngInfo));
return saveFile(image, path);
}
auto ucharVectorToString(const vector<unsigned char> &data) -> string {
string dataString;
for (auto &byte : data) {
dataString += byte;
}
return dataString;
}
auto getUiLang() -> BYTE {
return LOBYTE(GetUserDefaultUILanguage());
}
auto replace(const string &s, char search, const string replace) -> string {
auto pos = s.find(search);
if (string::npos == pos) {
return s;
}
return s.substr(0, pos) + replace + s.substr(pos + 1);
open(strings::utf8ToWideString(path));
}
} // namespace bsnesMt

View file

@ -2,31 +2,17 @@
#pragma once
#include <cstdint>
#include <string>
#include <vector>
#include <Windows.h>
namespace bsnesMt {
using std::string, std::wstring, std::vector;
auto utf8ToWideString(const string &utf8) -> wstring;
using std::string, std::wstring;
auto getTime() -> SYSTEMTIME;
auto open(const wstring &path) -> void;
auto open(const string &path) -> void;
auto saveFile(const string &data, const string &path) -> bool;
auto saveBgraArrayAsPngImage(uint8_t* data, uint16_t width, uint16_t height, const string &path) -> bool;
auto ucharVectorToString(const vector<unsigned char> &data) -> string;
auto getUiLang() -> BYTE;
auto replace(const string &s, char search, const string replace) -> string;
} // namespace bsnesMt

View file

@ -1,5 +1,7 @@
/*! bsnes-mt by Marat Tanalin | http://tanalin.com/en/projects/bsnes-mt/ */
#include <string>
#include <Windows.h>
#include <Commctrl.h>
@ -7,13 +9,15 @@
#include "app.h"
#include "strings.h"
#include "translations.h"
#include "utils.h"
#include "windows.h"
namespace bsnesMt::windows {
using std::wstring;
using std::string, std::wstring;
using namespace strings;
auto getWorkAreaSize() -> SIZE {
RECT rect;
@ -45,12 +49,12 @@ auto showAbout(HWND parentWindow) -> void {
TASKDIALOGCONFIG config{};
// Variables are needed, otherwise `TaskDialogIndirect()` may display random garbage.
const wstring windowTitleWide = utf8ToWideString(replace(strings::get("Menu.Help.About"), '|', appTitle));
const wstring windowTitleWide = utf8ToWideString(replaceOnce(translations::get("Menu.Help.About"), '|', appTitle));
const wstring headingWide = utf8ToWideString(appTitle + " " + app::version);
const wstring textWide = utf8ToWideString(strings::get({
{strings::EN, app::infoEn},
{strings::RU, app::infoRu}
const wstring textWide = utf8ToWideString(translations::get({
{"en", app::infoEn},
{"ru", app::infoRu}
}));
config.cbSize = sizeof(config);

View file

@ -2,15 +2,10 @@
#pragma once
#include <cstdint>
#include <string>
#include <Windows.h>
namespace bsnesMt::windows {
using std::string;
auto getWorkAreaSize() -> SIZE;
auto isTopLevelWindow(HWND window) -> bool;

View file

@ -47,7 +47,7 @@ else ifneq ($(filter $(platform),linux bsd),)
endif
# `bsnes-mt-*` are added by MT.
objects := libco emulator filter lzma bsnes-mt-scaling bsnes-mt-windows bsnes-mt-messagebox bsnes-mt-is bsnes-mt-png-pixel bsnes-mt-png-chunk bsnes-mt-png-image bsnes-mt-strings bsnes-mt-utils bsnes-mt-kb
objects := libco emulator filter lzma bsnes-mt-scaling bsnes-mt-windows bsnes-mt-messagebox bsnes-mt-is bsnes-mt-png-pixel bsnes-mt-png-chunk bsnes-mt-png-image bsnes-mt-strings bsnes-mt-translations bsnes-mt-utils bsnes-mt-kb bsnes-mt-files
obj/bsnes-mt-scaling.o: ../bsnes-mt/scaling.cpp # MT.
obj/bsnes-mt-windows.o: ../bsnes-mt/windows.cpp # MT.
@ -57,8 +57,10 @@ obj/bsnes-mt-png-pixel.o: ../bsnes-mt/pizza-png/src/Pixel.cpp # MT.
obj/bsnes-mt-png-chunk.o: ../bsnes-mt/pizza-png/src/Chunk.cpp # MT.
obj/bsnes-mt-png-image.o: ../bsnes-mt/pizza-png/src/Image.cpp # MT.
obj/bsnes-mt-strings.o: ../bsnes-mt/strings.cpp # MT.
obj/bsnes-mt-translations.o: ../bsnes-mt/translations.cpp # MT.
obj/bsnes-mt-utils.o: ../bsnes-mt/utils.cpp # MT.
obj/bsnes-mt-kb.o: ../bsnes-mt/keyboard.cpp # MT.
obj/bsnes-mt-files.o: ../bsnes-mt/files.cpp # MT.
obj/libco.o: ../libco/libco.c
obj/emulator.o: emulator/emulator.cpp
obj/filter.o: filter/filter.cpp

View file

@ -1,9 +1,9 @@
#include <sfc/sfc.hpp>
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
/* /MT. */
namespace SuperFamicom {
@ -69,7 +69,7 @@ auto Cartridge::load() -> bool {
string pal = "PAL";
/* /MT. */
if(auto loaded = platform->load(ID::SuperFamicom, "Super Famicom", "sfc", {bms::get("Common.Auto").data(), ntsc, pal})) { // "Auto"
if(auto loaded = platform->load(ID::SuperFamicom, "Super Famicom", "sfc", {bmt::get("Common.Auto").data(), ntsc, pal})) { // "Auto"
/* MT. */
auto option = loaded.option;
string auto_ = "Auto";

View file

@ -3,8 +3,10 @@
/* MT. */
#include "bsnes-mt/keyboard.h"
#include "bsnes-mt/translations.h"
namespace bmk = bsnesMt::keyboard;
namespace bmt = bsnesMt::translations;
/* /MT. */
Video video;
@ -65,6 +67,8 @@ auto locate(string name) -> string {
#include <nall/main.hpp>
auto nall::main(Arguments arguments) -> void {
bmt::initLocale(); // MT.
settings.location = locate("bsnes-mt-settings.bml");
for (auto argument : arguments) {

View file

@ -1,9 +1,9 @@
/* MT. */
#include "bsnes-mt/app.h"
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
namespace bms = bsnesMt::strings;
namespace bma = bsnesMt::app;
namespace bmt = bsnesMt::translations;
/* /MT. */
auto InputHotkey::logic() const -> Logic {
@ -43,7 +43,7 @@ auto InputManager::bindHotkeys() -> void {
}
if (program.rewind.frequency == 0) {
program.showMessage(bms::get("Settings.Hotkeys.Rewind.enableFirst").data());
program.showMessage(bmt::get("Settings.Hotkeys.Rewind.enableFirst").data());
return;
}
@ -92,7 +92,7 @@ auto InputManager::bindHotkeys() -> void {
stateSlot = bma::quickStatesNumber;
}
program.showMessage({bms::get("Tools.LoadState.SelectedStateSlot").data(), space, stateSlot});
program.showMessage({bmt::get("Tools.LoadState.SelectedStateSlot").data(), space, stateSlot});
}));
hotkeys.append(InputHotkey("Increment State Slot").onPress([&] {
@ -100,7 +100,7 @@ auto InputManager::bindHotkeys() -> void {
stateSlot = 1;
}
program.showMessage({bms::get("Tools.LoadState.SelectedStateSlot").data(), space, stateSlot});
program.showMessage({bmt::get("Tools.LoadState.SelectedStateSlot").data(), space, stateSlot});
}));
hotkeys.append(InputHotkey("Capture Screenshot").onPress([] {

View file

@ -6,13 +6,13 @@
#include "bsnes-mt/app.h"
#include "bsnes-mt/messagebox.h"
#include "bsnes-mt/scaling.h"
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
#include "bsnes-mt/utils.h"
#include "bsnes-mt/windows.h"
namespace bms = bsnesMt::strings;
namespace bmw = bsnesMt::windows;
namespace bma = bsnesMt::app;
namespace bmt = bsnesMt::translations;
namespace bmw = bsnesMt::windows;
/* /MT. */
namespace Instances { Instance<Presentation> presentation; }
@ -21,61 +21,61 @@ Presentation& presentation = Instances::presentation();
auto Presentation::create() -> void {
auto ellipsis = "..."; // MT.
fileMenu.setText(bms::get("Menu.File").data()); // MT.
fileMenu.setText(bmt::get("Menu.File").data()); // MT.
loadGame.setIcon(Icon::Action::Open).setText({bms::get("Menu.File.OpenGame").data(), ellipsis, "\tCtrl+O"}).onActivate([&] {
loadGame.setIcon(Icon::Action::Open).setText({bmt::get("Menu.File.OpenGame").data(), ellipsis, "\tCtrl+O"}).onActivate([&] {
program.load();
});
loadRecentGame.setIcon(Icon::Action::Open).setText(bms::get("Menu.File.OpenRecentGame").data());
loadRecentGame.setIcon(Icon::Action::Open).setText(bmt::get("Menu.File.OpenRecentGame").data());
updateRecentGames();
unloadGame.setIcon(Icon::Action::Remove).setText(bms::get("Menu.File.CloseGame").data()).setEnabled(false).onActivate([&] {
unloadGame.setIcon(Icon::Action::Remove).setText(bmt::get("Menu.File.CloseGame").data()).setEnabled(false).onActivate([&] {
program.unload();
});
quit.setIcon(Icon::Action::Quit).setText({bms::get("Menu.File.Exit").data(), "\tAlt+F4"}).onActivate([&] {
quit.setIcon(Icon::Action::Quit).setText({bmt::get("Menu.File.Exit").data(), "\tAlt+F4"}).onActivate([&] {
program.quit();
});
systemMenu.setText(bms::get("Menu.System").data());
systemMenu.setText(bmt::get("Menu.System").data());
resetSystem.setIcon(Icon::Action::Refresh).setText(bms::get("Common.Reset").data()).setEnabled(false).onActivate([&] {
resetSystem.setIcon(Icon::Action::Refresh).setText(bmt::get("Common.Reset").data()).setEnabled(false).onActivate([&] {
program.reset();
});
controllerPort1.setIcon(Icon::Device::Joypad).setText({bms::get("Menu.System.ControllerPort").data(), " 1"});
controllerPort2.setIcon(Icon::Device::Joypad).setText({bms::get("Menu.System.ControllerPort").data(), " 2"});
controllerPort1.setIcon(Icon::Device::Joypad).setText({bmt::get("Menu.System.ControllerPort").data(), " 1"});
controllerPort2.setIcon(Icon::Device::Joypad).setText({bmt::get("Menu.System.ControllerPort").data(), " 2"});
expansionPort.setIcon(Icon::Device::Storage).setText(bms::get("Menu.System.ExpansionPort").data());
expansionPort.setIcon(Icon::Device::Storage).setText(bmt::get("Menu.System.ExpansionPort").data());
updateDeviceMenu();
settingsMenu.setText(bms::get("Settings").data());
settingsMenu.setText(bmt::get("Settings").data());
sizeMenu.setIcon(Icon::Emblem::Image).setText(bms::get("Menu.Settings.Size").data());
sizeMenu.setIcon(Icon::Emblem::Image).setText(bmt::get("Menu.Settings.Size").data());
updateSizeMenu();
outputMenu.setIcon(Icon::Emblem::Image).setText(bms::get("Menu.Settings.Output").data());
outputMenu.setIcon(Icon::Emblem::Image).setText(bmt::get("Menu.Settings.Output").data());
centerViewport.setText(bms::get("Menu.Settings.Output.Center").data()).onActivate([&] {
centerViewport.setText(bmt::get("Menu.Settings.Output.Center").data()).onActivate([&] {
settings.video.output = "Center";
video.clear();
});
/* MT */
perfectViewport.setText(bms::get("Menu.Settings.Output.PixelPerfect").data()).onActivate([&] {
perfectViewport.setText(bmt::get("Menu.Settings.Output.PixelPerfect").data()).onActivate([&] {
settings.video.output = "Pixel-Perfect";
video.clear();
});
/* /MT */
scaleViewport.setText(bms::get("Menu.Settings.Output.Scale").data()).onActivate([&] {
scaleViewport.setText(bmt::get("Menu.Settings.Output.Scale").data()).onActivate([&] {
settings.video.output = "Scale";
video.clear();
});
stretchViewport.setText(bms::get("Menu.Settings.Output.Stretch").data()).onActivate([&] {
stretchViewport.setText(bmt::get("Menu.Settings.Output.Stretch").data()).onActivate([&] {
settings.video.output = "Stretch";
video.clear();
});
@ -97,7 +97,7 @@ auto Presentation::create() -> void {
stretchViewport.setChecked();
}
aspectCorrection.setText(bms::get("Menu.Settings.Output.AspectRatioCorrection").data())
aspectCorrection.setText(bmt::get("Menu.Settings.Output.AspectRatioCorrection").data())
.setChecked(settings.video.aspectCorrection)
.onToggle([&] {
settings.video.aspectCorrection = aspectCorrection.checked();
@ -105,7 +105,7 @@ auto Presentation::create() -> void {
//resizeWindow(); // Commented-out by MT.
});
showOverscanArea.setText(bms::get("Menu.Settings.Output.ShowOverscanArea").data())
showOverscanArea.setText(bmt::get("Menu.Settings.Output.ShowOverscanArea").data())
.setChecked(settings.video.overscan)
.onToggle([&] {
settings.video.overscan = showOverscanArea.checked();
@ -114,14 +114,14 @@ auto Presentation::create() -> void {
});
/* MT. */
scalingInfo.setText(bms::get("Menu.Settings.Output.scalingInfo").data())
scalingInfo.setText(bmt::get("Menu.Settings.Output.scalingInfo").data())
.setChecked(settings.video.scalingInfo)
.onToggle([&] {
settings.video.scalingInfo = scalingInfo.checked();
});
/* /MT. */
blurEmulation.setText(bms::get("Menu.Settings.Output.HiresBlurEmulation").data())
blurEmulation.setText(bmt::get("Menu.Settings.Output.HiresBlurEmulation").data())
.setChecked(settings.video.blur)
.onToggle([&] {
settings.video.blur = blurEmulation.checked();
@ -129,9 +129,9 @@ auto Presentation::create() -> void {
})
.doToggle();
filterMenu.setIcon(Icon::Emblem::Image).setText(bms::get("Menu.Settings.Filter").data());
filterMenu.setIcon(Icon::Emblem::Image).setText(bmt::get("Menu.Settings.Filter").data());
filterNone.setText(bms::get("Common.None").data()).onActivate([&] {
filterNone.setText(bmt::get("Common.None").data()).onActivate([&] {
settings.video.filter = "None";
});
@ -239,9 +239,9 @@ auto Presentation::create() -> void {
filterNTSC_RGB.setChecked();
}
shaderMenu.setIcon(Icon::Emblem::Image).setText(bms::get("Menu.Settings.Shader").data());
shaderMenu.setIcon(Icon::Emblem::Image).setText(bmt::get("Menu.Settings.Shader").data());
muteAudio.setText(bms::get("Menu.Settings.MuteAudio").data())
muteAudio.setText(bmt::get("Menu.Settings.MuteAudio").data())
.setChecked(settings.audio.mute)
.onToggle([&] {
settings.audio.mute = muteAudio.checked();
@ -255,7 +255,7 @@ auto Presentation::create() -> void {
})
.doToggle(); //set initial mute state flag
showStatusBar.setText(bms::get("Menu.Settings.ShowStatusBar").data())
showStatusBar.setText(bmt::get("Menu.Settings.ShowStatusBar").data())
.setChecked(settings.general.statusBar)
.onToggle([&] {
settings.general.statusBar = showStatusBar.checked();
@ -270,44 +270,44 @@ auto Presentation::create() -> void {
//if (visible()) resizeWindow(); // Commented-out by MT.
});
videoSettings.setIcon(Icon::Device::Display).setText({bms::get("Common.Video").data(), ellipsis}).onActivate([&] {
videoSettings.setIcon(Icon::Device::Display).setText({bmt::get("Common.Video").data(), ellipsis}).onActivate([&] {
settingsWindow.show(0);
});
audioSettings.setIcon(Icon::Device::Speaker).setText({bms::get("Common.Audio").data(), ellipsis}).onActivate([&] {
audioSettings.setIcon(Icon::Device::Speaker).setText({bmt::get("Common.Audio").data(), ellipsis}).onActivate([&] {
settingsWindow.show(1);
});
inputSettings.setIcon(Icon::Device::Joypad).setText({bms::get("Settings.Input").data(), ellipsis}).onActivate([&] {
inputSettings.setIcon(Icon::Device::Joypad).setText({bmt::get("Settings.Input").data(), ellipsis}).onActivate([&] {
settingsWindow.show(2);
});
hotkeySettings.setIcon(Icon::Device::Keyboard).setText({bms::get("Settings.Hotkeys").data(), ellipsis}).onActivate([&] {
hotkeySettings.setIcon(Icon::Device::Keyboard).setText({bmt::get("Settings.Hotkeys").data(), ellipsis}).onActivate([&] {
settingsWindow.show(3);
});
pathSettings.setIcon(Icon::Emblem::Folder).setText({bms::get("Settings.Paths").data(), ellipsis}).onActivate([&] {
pathSettings.setIcon(Icon::Emblem::Folder).setText({bmt::get("Settings.Paths").data(), ellipsis}).onActivate([&] {
settingsWindow.show(4);
});
emulatorSettings.setIcon(Icon::Action::Settings).setText({bms::get("Settings.Emulator").data(), ellipsis}).onActivate([&] {
emulatorSettings.setIcon(Icon::Action::Settings).setText({bmt::get("Settings.Emulator").data(), ellipsis}).onActivate([&] {
settingsWindow.show(5);
});
enhancementSettings.setIcon(Icon::Action::Add).setText({bms::get("Settings.Enhancements").data(), ellipsis}).onActivate([&] {
enhancementSettings.setIcon(Icon::Action::Add).setText({bmt::get("Settings.Enhancements").data(), ellipsis}).onActivate([&] {
settingsWindow.show(6);
});
compatibilitySettings.setIcon(Icon::Action::Remove).setText({bms::get("Settings.Compatibility").data(), ellipsis}).onActivate([&] {
compatibilitySettings.setIcon(Icon::Action::Remove).setText({bmt::get("Settings.Compatibility").data(), ellipsis}).onActivate([&] {
settingsWindow.show(7);
});
driverSettings.setIcon(Icon::Place::Settings).setText({bms::get("Settings.Drivers").data(), ellipsis}).onActivate([&] {
driverSettings.setIcon(Icon::Place::Settings).setText({bmt::get("Settings.Drivers").data(), ellipsis}).onActivate([&] {
settingsWindow.show(8);
});
/* MT. */
settingsFolder.setIcon(Icon::Emblem::Folder).setText(bms::get("Menu.Settings.OpenSettingsFolder").data()).onActivate([&] {
settingsFolder.setIcon(Icon::Emblem::Folder).setText(bmt::get("Menu.Settings.OpenSettingsFolder").data()).onActivate([&] {
string path = nall::Location::path(locate("bsnes-mt-settings.bml"));
bsnesMt::open(path.get());
});
@ -315,30 +315,30 @@ auto Presentation::create() -> void {
char space = ' '; // MT.
toolsMenu.setText(bms::get("Tools").data()).setVisible(false);
toolsMenu.setText(bmt::get("Tools").data()).setVisible(false);
saveState.setIcon(Icon::Media::Record).setText(bms::get("Tools.SaveState").data());
saveState.setIcon(Icon::Media::Record).setText(bmt::get("Tools.SaveState").data());
for (uint index : range(QuickStates)) {
MenuItem item{&saveState};
item.setAttribute("name", {"Quick/Slot ", 1 + index});
item.setAttribute("title", {bms::get("Tools.SaveState.Slot").data(), space, 1 + index});
item.setText({bms::get("Tools.SaveState.Slot").data(), space, 1 + index});
item.setAttribute("title", {bmt::get("Tools.SaveState.Slot").data(), space, 1 + index});
item.setText({bmt::get("Tools.SaveState.Slot").data(), space, 1 + index});
item.onActivate([=] {
program.saveState({"Quick/Slot ", 1 + index});
});
}
loadState.setIcon(Icon::Media::Rewind).setText(bms::get("Tools.LoadState").data());
loadState.setIcon(Icon::Media::Rewind).setText(bmt::get("Tools.LoadState").data());
for (uint index : range(QuickStates)) {
MenuItem item{&loadState};
item.setAttribute("name", {"Quick/Slot ", 1 + index});
item.setAttribute("title", {bms::get("Tools.SaveState.Slot").data(), space, 1 + index});
item.setText({bms::get("Tools.SaveState.Slot").data(), space, 1 + index});
item.setAttribute("title", {bmt::get("Tools.SaveState.Slot").data(), space, 1 + index});
item.setText({bmt::get("Tools.SaveState.Slot").data(), space, 1 + index});
item.onActivate([=] {
program.loadState({"Quick/Slot ", 1 + index});
@ -349,24 +349,24 @@ auto Presentation::create() -> void {
loadState.append(MenuItem()
.setAttribute("name", "Quick/Undo")
.setAttribute("title", bms::get("Tools.LoadState.UndoLastSave").data())
.setIcon(Icon::Edit::Undo).setText(bms::get("Tools.LoadState.UndoLastSave").data()).onActivate([&] {
.setAttribute("title", bmt::get("Tools.LoadState.UndoLastSave").data())
.setIcon(Icon::Edit::Undo).setText(bmt::get("Tools.LoadState.UndoLastSave").data()).onActivate([&] {
program.loadState("Quick/Undo");
}));
loadState.append(MenuItem()
.setAttribute("name", "Quick/Redo")
.setAttribute("title", bms::get("Tools.LoadState.RedoLastUndo").data())
.setIcon(Icon::Edit::Redo).setText(bms::get("Tools.LoadState.RedoLastUndo").data()).onActivate([&] {
.setAttribute("title", bmt::get("Tools.LoadState.RedoLastUndo").data())
.setIcon(Icon::Edit::Redo).setText(bmt::get("Tools.LoadState.RedoLastUndo").data()).onActivate([&] {
program.loadState("Quick/Redo");
}));
loadState.append(MenuItem().setIcon(Icon::Edit::Clear)
.setText(bms::get("Tools.LoadState.RemoveAllStates").data())
.setText(bmt::get("Tools.LoadState.RemoveAllStates").data())
.onActivate([&] {
/* // Commented-out by MT.
if (MessageDialog(bms::get("Tools.LoadState.RemoveAllStates.confirm").data()).setAlignment(*this)
.question({bms::get("Common.Yes").data(), bms::get("Common.No").data()}) == bms::get("Common.Yes").data())
if (MessageDialog(bmt::get("Tools.LoadState.RemoveAllStates.confirm").data()).setAlignment(*this)
.question({bmt::get("Common.Yes").data(), bmt::get("Common.No").data()}) == bmt::get("Common.Yes").data())
{
*/
@ -380,82 +380,82 @@ auto Presentation::create() -> void {
}
}));
speedMenu.setIcon(Icon::Device::Clock).setText(bms::get("Tools.Speed").data()).setEnabled(!settings.video.blocking && settings.audio.blocking);
speedMenu.setIcon(Icon::Device::Clock).setText(bmt::get("Tools.Speed").data()).setEnabled(!settings.video.blocking && settings.audio.blocking);
speedSlowest.setText({"50% (", bms::get("Tools.Speed.Slowest").data(), ")"}).setAttribute("multiplier", "2.0").onActivate([&] {
speedSlowest.setText({"50% (", bmt::get("Tools.Speed.Slowest").data(), ")"}).setAttribute("multiplier", "2.0").onActivate([&] {
program.updateAudioFrequency();
});
speedSlow.setText({"75% (", bms::get("Tools.Speed.Slow").data(), ")"}).setAttribute("multiplier", "1.333").onActivate([&] {
speedSlow.setText({"75% (", bmt::get("Tools.Speed.Slow").data(), ")"}).setAttribute("multiplier", "1.333").onActivate([&] {
program.updateAudioFrequency();
});
speedNormal.setText({"100% (", bms::get("Tools.Speed.Normal").data(), ")"}).setAttribute("multiplier", "1.0").onActivate([&] {
speedNormal.setText({"100% (", bmt::get("Tools.Speed.Normal").data(), ")"}).setAttribute("multiplier", "1.0").onActivate([&] {
program.updateAudioFrequency();
});
speedFast.setText({"150% (", bms::get("Tools.Speed.Fast").data(), ")"}).setAttribute("multiplier", "0.667").onActivate([&] {
speedFast.setText({"150% (", bmt::get("Tools.Speed.Fast").data(), ")"}).setAttribute("multiplier", "0.667").onActivate([&] {
program.updateAudioFrequency();
});
speedFastest.setText({"200% (", bms::get("Tools.Speed.Fastest").data(), ")"}).setAttribute("multiplier", "0.5").onActivate([&] {
speedFastest.setText({"200% (", bmt::get("Tools.Speed.Fastest").data(), ")"}).setAttribute("multiplier", "0.5").onActivate([&] {
program.updateAudioFrequency();
});
runMenu.setIcon(Icon::Media::Play).setText(bms::get("Tools.RunMode").data());
runMenu.setIcon(Icon::Media::Play).setText(bmt::get("Tools.RunMode").data());
runEmulation.setText(bms::get("Tools.RunMode.Normal").data()).onActivate([&] {});
runEmulation.setText(bmt::get("Tools.RunMode.Normal").data()).onActivate([&] {});
pauseEmulation.setText(bms::get("Tools.RunMode.PauseEmulation").data()).onActivate([&] {
pauseEmulation.setText(bmt::get("Tools.RunMode.PauseEmulation").data()).onActivate([&] {
audio.clear();
});
frameAdvance.setText(bms::get("Tools.RunMode.FrameAdvance").data()).onActivate([&] {
frameAdvance.setText(bmt::get("Tools.RunMode.FrameAdvance").data()).onActivate([&] {
audio.clear();
program.frameAdvanceLock = true;
});
movieMenu.setIcon(Icon::Emblem::Video).setText(bms::get("Tools.Movie").data());
movieMenu.setIcon(Icon::Emblem::Video).setText(bmt::get("Tools.Movie").data());
moviePlay.setIcon(Icon::Media::Play).setText(bms::get("Tools.Movie.Play").data()).onActivate([&] {
moviePlay.setIcon(Icon::Media::Play).setText(bmt::get("Tools.Movie.Play").data()).onActivate([&] {
program.moviePlay();
});
movieRecord.setIcon(Icon::Media::Record).setText(bms::get("Tools.Movie.Record").data()).onActivate([&] {
movieRecord.setIcon(Icon::Media::Record).setText(bmt::get("Tools.Movie.Record").data()).onActivate([&] {
program.movieRecord(false);
});
movieRecordFromBeginning.setIcon(Icon::Media::Record).setText(bms::get("Tools.Movie.ResetAndRecord").data()).onActivate([&] {
movieRecordFromBeginning.setIcon(Icon::Media::Record).setText(bmt::get("Tools.Movie.ResetAndRecord").data()).onActivate([&] {
program.movieRecord(true);
});
movieStop.setIcon(Icon::Media::Stop).setText(bms::get("Tools.Movie.Stop").data()).onActivate([&] {
movieStop.setIcon(Icon::Media::Stop).setText(bmt::get("Tools.Movie.Stop").data()).onActivate([&] {
program.movieStop();
});
captureScreenshot.setIcon(Icon::Emblem::Image).setText(bms::get("Tools.TakeScreenshot").data()).onActivate([&] {
captureScreenshot.setIcon(Icon::Emblem::Image).setText(bmt::get("Tools.TakeScreenshot").data()).onActivate([&] {
program.captureScreenshot();
});
cheatFinder.setIcon(Icon::Action::Search).setText({bms::get("Tools.CheatFinder").data(), ellipsis}).onActivate([&] {
cheatFinder.setIcon(Icon::Action::Search).setText({bmt::get("Tools.CheatFinder").data(), ellipsis}).onActivate([&] {
toolsWindow.show(0);
});
cheatEditor.setIcon(Icon::Edit::Replace).setText({bms::get("Tools.CheatEditor").data(), ellipsis}).onActivate([&] {
cheatEditor.setIcon(Icon::Edit::Replace).setText({bmt::get("Tools.CheatEditor").data(), ellipsis}).onActivate([&] {
toolsWindow.show(1);
});
stateManager.setIcon(Icon::Application::FileManager).setText({bms::get("Tools.StateManager").data(), ellipsis}).onActivate([&] {
stateManager.setIcon(Icon::Application::FileManager).setText({bmt::get("Tools.StateManager").data(), ellipsis}).onActivate([&] {
toolsWindow.show(2);
});
manifestViewer.setIcon(Icon::Emblem::Text).setText({bms::get("Tools.ManifestViewer").data(), ellipsis}).onActivate([&] {
manifestViewer.setIcon(Icon::Emblem::Text).setText({bmt::get("Tools.ManifestViewer").data(), ellipsis}).onActivate([&] {
toolsWindow.show(3);
});
helpMenu.setText(bms::get("Menu.Help").data());
helpMenu.setText(bmt::get("Menu.Help").data());
string aboutString = bms::get("Menu.Help.About").data(); // MT.
string aboutString = bmt::get("Menu.Help.About").data(); // MT.
aboutSameBoy.setIcon(Icon::Prompt::Question)
.setText({string(aboutString).replace('|', Emulator::SameBoyName), ellipsis})
@ -463,7 +463,7 @@ auto Presentation::create() -> void {
AboutDialog()
.setName(Emulator::SameBoyName)
.setLogo(Resource::SameBoy)
.setDescription(bms::get("About.SameBoy.description").data())
.setDescription(bmt::get("About.SameBoy.description").data())
.setVersion("0.12.1")
.setCopyright("Lior Halphon")
.setLicense("MIT")
@ -478,10 +478,10 @@ auto Presentation::create() -> void {
AboutDialog()
.setName(Emulator::Name)
.setLogo(Resource::Logo)
.setDescription(bms::get("About.Bsnes.description").data())
.setDescription(bmt::get("About.Bsnes.description").data())
.setVersion(Emulator::Version)
.setCopyright(bms::get("About.Bsnes.copyright").data())
.setLicense(bms::get("About.Bsnes.license").data())
.setCopyright(bmt::get("About.Bsnes.copyright").data())
.setLicense(bmt::get("About.Bsnes.license").data())
.setWebsite(Emulator::Website)
.setAlignment(*this)
.show();
@ -607,12 +607,12 @@ auto Presentation::updateStatusIcon() -> void {
if (emulator->loaded() && program.verified()) {
image emblem{Icon::Emblem::Program};
icon.impose(image::blend::sourceAlpha, 0, (StatusHeight - 16) / 2, emblem, 0, 0, 16, 16);
statusIcon.setIcon(icon).setToolTip(bms::get("StatusIcon.verifiedRom.tooltip").data());
statusIcon.setIcon(icon).setToolTip(bmt::get("StatusIcon.verifiedRom.tooltip").data());
}
else if (emulator->loaded()) {
image emblem{Icon::Emblem::Binary};
icon.impose(image::blend::sourceAlpha, 0, (StatusHeight - 16) / 2, emblem, 0, 0, 16, 16);
statusIcon.setIcon(icon).setToolTip(bms::get("StatusIcon.unverifiedRom.tooltip").data());
statusIcon.setIcon(icon).setToolTip(bmt::get("StatusIcon.unverifiedRom.tooltip").data());
}
else {
statusIcon.setIcon(icon).setToolTip();
@ -676,7 +676,7 @@ auto Presentation::updateDeviceMenu() -> void {
MenuRadioItem item{menu};
item.setAttribute("deviceID", device.id);
item.setText(bms::getDeviceString(device.name.data()).data());
item.setText(bmt::getDeviceString(device.name.data()).data());
item.onActivate([=] {
settings(path).setValue(device.name);
@ -765,22 +765,22 @@ auto Presentation::updateSizeMenu() -> void {
sizeMenu.append(MenuSeparator());
sizeMenu.append(MenuItem().setIcon(Icon::Action::Remove).setText(bms::get("Menu.Settings.Size.ShrinkWindowToSize").data()).onActivate([&] {
sizeMenu.append(MenuItem().setIcon(Icon::Action::Remove).setText(bmt::get("Menu.Settings.Size.ShrinkWindowToSize").data()).onActivate([&] {
resizeWindow();
}));
sizeMenu.append(MenuItem().setIcon(Icon::Place::Settings).setText(bms::get("Menu.Settings.Size.CenterWindow").data()).onActivate([&] {
sizeMenu.append(MenuItem().setIcon(Icon::Place::Settings).setText(bmt::get("Menu.Settings.Size.CenterWindow").data()).onActivate([&] {
setAlignment(Alignment::Center);
}));
/* MT. */
sizeMenu.append(MenuItem().setIcon(Icon::Device::Display).setText({bms::get("Menu.Settings.Size.FullScreenMode").data(), "\tAlt+Enter"}).onActivate([&] {
sizeMenu.append(MenuItem().setIcon(Icon::Device::Display).setText({bmt::get("Menu.Settings.Size.FullScreenMode").data(), "\tAlt+Enter"}).onActivate([&] {
program.toggleVideoFullScreen();
}));
/* /MT. */
/* MT. */
sizeMenu.append(MenuItem().setIcon(Icon::Device::Display).setText({bms::get("Menu.Settings.Size.PseudoFullScreenMode").data(), "\tShift+Enter"}).onActivate([&] {
sizeMenu.append(MenuItem().setIcon(Icon::Device::Display).setText({bmt::get("Menu.Settings.Size.PseudoFullScreenMode").data(), "\tShift+Enter"}).onActivate([&] {
program.toggleVideoPseudoFullScreen();
}));
/* /MT. */
@ -797,7 +797,7 @@ auto Presentation::findState(vector<Program::State> &states, const string &name)
auto Presentation::updateStateMenus() -> void {
auto states = program.availableStates("Quick/");
string emptySlotString = bms::get("Tools.SaveState.Slot.Empty").data(); // MT.
string emptySlotString = bmt::get("Tools.SaveState.Slot.Empty").data(); // MT.
for (auto& action : saveState.actions()) {
if (auto item = action.cast<MenuItem>()) {
@ -910,7 +910,7 @@ auto Presentation::updateRecentGames() -> void {
loadRecentGame.append(MenuSeparator());
loadRecentGame.append(MenuItem().setIcon(Icon::Edit::Clear)
.setText(bms::get("Menu.File.OpenRecentGame.ClearList").data())
.setText(bmt::get("Menu.File.OpenRecentGame.ClearList").data())
.onActivate([&] {
if (bmw::confirmById("Menu.File.OpenRecentGame.ClearList.confirm", handle())) {
for (auto index : range(RecentGames)) {
@ -924,7 +924,7 @@ auto Presentation::updateRecentGames() -> void {
/* MT. */
else {
loadRecentGame.append(MenuItem().setIcon(Icon::Emblem::File).setEnabled(false)
.setText({"(", bms::get("Menu.File.OpenRecentGame.NoRecentGames").data(), ")"}));
.setText({"(", bmt::get("Menu.File.OpenRecentGame.NoRecentGames").data(), ")"}));
}
/* /MT. */
}
@ -963,7 +963,7 @@ auto Presentation::updateShaders() -> void {
Group shaders;
MenuRadioItem none{&shaderMenu};
none.setText(bms::get("Common.None").data()).onActivate([&] {
none.setText(bmt::get("Common.None").data()).onActivate([&] {
settings.video.shader = "None";
program.updateVideoShader();
});
@ -972,7 +972,7 @@ auto Presentation::updateShaders() -> void {
MenuRadioItem blur{&shaderMenu};
blur.setText(bms::get("Menu.Settings.Shader.Blur").data()).onActivate([&] {
blur.setText(bmt::get("Menu.Settings.Shader.Blur").data()).onActivate([&] {
settings.video.shader = "Blur";
program.updateVideoShader();
});

View file

@ -17,7 +17,7 @@ auto Program::updateAudioDriver(Window parent) -> void {
updateAudioDynamic();
if (!audio.ready()) {
string message = bms::get("Settings.Drivers.Audio.failedToInitialize").data(); // MT.
string message = bmt::get("Settings.Drivers.Audio.failedToInitialize").data(); // MT.
// MessageDialog(message.replace('|', settings.audio.driver)).setAlignment(parent).error(); // Commented-out by MT.
bmw::showError(message.replace('|', settings.audio.driver).data(), "", parent.handle()); // MT.

View file

@ -1,11 +1,11 @@
/* MT. */
#include "bsnes-mt/messagebox.h"
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
#include "bsnes-mt/app.h"
namespace bms = bsnesMt::strings;
namespace bmw = bsnesMt::windows;
namespace bma = bsnesMt::app;
namespace bmt = bsnesMt::translations;
namespace bmw = bsnesMt::windows;
/* /MT. */
auto Program::load() -> void {
@ -44,15 +44,15 @@ auto Program::load() -> void {
auto lock = acquire();
/* // Commented-out by MT.
string alwaysString = bms::get("Common.Always").data(); // MT.
string noString = bms::get("Common.No").data(); // MT.
string alwaysString = bmt::get("Common.Always").data(); // MT.
string noString = bmt::get("Common.No").data(); // MT.
auto response = MessageDialog(bms::get("Game.unverifiedGameWarning").data()).setAlignment(*presentation)
.question({alwaysString, bms::get("Common.Yes").data(), noString});
auto response = MessageDialog(bmt::get("Game.unverifiedGameWarning").data()).setAlignment(*presentation)
.question({alwaysString, bmt::get("Common.Yes").data(), noString});
if (response == noString) {
emulator->unload();
return showMessage(bms::get("Game.GameOpeningCancelled").data());
return showMessage(bmt::get("Game.GameOpeningCancelled").data());
}
if (response == alwaysString) {
@ -70,7 +70,7 @@ auto Program::load() -> void {
}
else {
emulator->unload();
return showMessage(bms::get("Game.GameOpeningCancelled").data());
return showMessage(bmt::get("Game.GameOpeningCancelled").data());
}
/* /MT. */
}
@ -133,8 +133,8 @@ auto Program::load() -> void {
// Moved down by MT.
showMessage({
verified() ? bms::get("Game.VerifiedGameOpened").data() : bms::get("Game.GameOpened").data(),
appliedPatch() ? bms::get("Game.AndPatchApplied").data() : "",
verified() ? bmt::get("Game.VerifiedGameOpened").data() : bmt::get("Game.GameOpened").data(),
appliedPatch() ? bmt::get("Game.AndPatchApplied").data() : "",
snesGame ? string({" [", gameRegion, "]"}) : "" // MT.
});
@ -437,7 +437,7 @@ auto Program::reset() -> void {
rewindReset(); //don't allow rewinding past a reset point
hackCompatibility();
emulator->reset();
showMessage(bms::get("Game.GameReset").data());
showMessage(bmt::get("Game.GameReset").data());
}
auto Program::unload() -> void {
@ -463,7 +463,7 @@ auto Program::unload() -> void {
}
emulator->unload();
showMessage(bms::get("Game.GameClosed").data());
showMessage(bmt::get("Game.GameClosed").data());
superFamicom = {};
gameBoy = {};

View file

@ -11,7 +11,7 @@ auto Program::updateInputDriver(Window parent) -> void {
hotkeySettings.reloadMappings();
if (!input.ready()) {
string message = bms::get("Settings.Drivers.Input.failedToInitialize").data(); // MT.
string message = bmt::get("Settings.Drivers.Input.failedToInitialize").data(); // MT.
// MessageDialog(message.replace('|', settings.input.driver)).setAlignment(parent).error(); // Commented-out by MT.
bmw::showError(message.replace('|', settings.input.driver).data(), "", parent.handle()); // MT.

View file

@ -23,9 +23,9 @@ auto Program::movieMode(Movie::Mode mode) -> void {
auto Program::moviePlay() -> void {
BrowserDialog dialog;
dialog.setTitle(bms::get("Movies.PlayMovie").data());
dialog.setTitle(bmt::get("Movies.PlayMovie").data());
dialog.setPath(Path::desktop());
dialog.setFilters({{bms::get("Movies.Movies").data(), " (.bsv)|*.bsv"}});
dialog.setFilters({{bmt::get("Movies.Movies").data(), " (.bsv)|*.bsv"}});
auto location = openFile(dialog);
@ -79,7 +79,7 @@ auto Program::moviePlay() -> void {
}
if (failed) {
showMessage(bms::get("Movies.formatNotSupported").data());
showMessage(bmt::get("Movies.formatNotSupported").data());
}
else {
movieMode(Movie::Mode::Playing);
@ -89,7 +89,7 @@ auto Program::moviePlay() -> void {
movie.input.append(fp.readl(2L));
}
showMessage(bms::get("Movies.playbackStarted").data());
showMessage(bmt::get("Movies.playbackStarted").data());
}
}
@ -112,7 +112,7 @@ auto Program::movieRecord(bool fromBeginning) -> void {
}
movie.input.reset();
showMessage(bms::get("Movies.recordingStarted").data());
showMessage(bmt::get("Movies.recordingStarted").data());
}
auto Program::movieStop() -> void {
@ -121,7 +121,7 @@ auto Program::movieStop() -> void {
}
if (movie.mode == Movie::Mode::Playing) {
showMessage(bms::get("Movies.playbackStopped").data());
showMessage(bmt::get("Movies.playbackStopped").data());
}
if (movie.mode == Movie::Mode::Recording) {
@ -130,9 +130,9 @@ auto Program::movieStop() -> void {
BrowserDialog dialog;
dialog.setTitle(bms::get("Movies.SaveMovie").data());
dialog.setTitle(bmt::get("Movies.SaveMovie").data());
dialog.setPath(Path::desktop());
dialog.setFilters({{bms::get("Movies.Movies").data(), " (.bsv)|*.bsv"}});
dialog.setFilters({{bmt::get("Movies.Movies").data(), " (.bsv)|*.bsv"}});
if (auto location = saveFile(dialog)) {
if (!location.endsWith(".bsv")) {
@ -151,14 +151,14 @@ auto Program::movieStop() -> void {
fp.writel(input, 2L);
}
showMessage(bms::get("Movies.MovieRecorded").data());
showMessage(bmt::get("Movies.MovieRecorded").data());
}
else {
showMessage(bms::get("Movies.cantRecord").data());
showMessage(bmt::get("Movies.cantRecord").data());
}
}
else {
showMessage(bms::get("Movies.MovieNotRecorded").data());
showMessage(bmt::get("Movies.MovieNotRecorded").data());
}
}

View file

@ -42,13 +42,13 @@ auto Program::applyPatchIPS(vector<uint8_t>& data, string location) -> bool {
/* // Commented-out by MT.
bool headered = false;
if (MessageDialog().setAlignment(*presentation).setTitle({Location::prefix(location), ".ips"}).setText(
bms::get("Patch.ipsWarning").data()
).question({bms::get("Common.Yes").data(), bms::get("Common.No").data()}) == bms::get("Common.Yes").data()) headered = true;
bmt::get("Patch.ipsWarning").data()
).question({bmt::get("Common.Yes").data(), bmt::get("Common.No").data()}) == bmt::get("Common.Yes").data()) headered = true;
*/
/* MT. */
bool headered = bmw::confirm(
bms::get("Patch.ipsWarning"),
bmt::get("Patch.ipsWarning"),
string({Location::prefix(location), ".ips"}).data(),
presentation->handle()
);
@ -177,11 +177,11 @@ auto Program::applyPatchBPS(vector<uint8_t>& input, string location) -> bool {
/* // Commented-out by MT.
MessageDialog({
error, "\n\n",
bms::get("Patch.ensureHeaderless").data()
bmt::get("Patch.ensureHeaderless").data()
}).setAlignment(*presentation).error();
*/
bmw::showError(string({error, "\n\n", bms::get("Patch.ensureHeaderless").data()}).data(), "", presentation->handle()); // MT.
bmw::showError(string({error, "\n\n", bmt::get("Patch.ensureHeaderless").data()}).data(), "", presentation->handle()); // MT.
return false;
}

View file

@ -8,9 +8,9 @@
#include <heuristics/_sufami-turbo.cpp>
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
/* /MT. */
//ROM data is held in memory to support compressed archives, soft-patching, and game hacks
@ -114,12 +114,12 @@ auto Program::open(uint id, string name, vfs::file::mode mode, bool required) ->
auto colonAndSpace = ": "; // MT.
MessageDialog({
bms::get("Common.Error").data(), colonAndSpace,
bms::get("Program.Open.MissingRequiredData").data(), name
bmt::get("Common.Error").data(), colonAndSpace,
bmt::get("Program.Open.MissingRequiredData").data(), name
}).setAlignment(*presentation).error();
*/
bmw::showError(string({bms::get("Program.Open.MissingRequiredData").data(), name}).data(), "", presentation->handle()); // MT.
bmw::showError(string({bmt::get("Program.Open.MissingRequiredData").data(), name}).data(), "", presentation->handle()); // MT.
}
return result;
@ -137,10 +137,10 @@ auto Program::load(uint id, string name, string type, vector<string> options) ->
superFamicom.location = game(1);
}
else {
dialog.setTitle(bms::get("Browser.OpenSnesRom").data());
dialog.setTitle(bmt::get("Browser.OpenSnesRom").data());
dialog.setPath(path("Games", settings.path.recent.superFamicom));
string snesRomsString = {bms::get("Browser.SnesRoms").data(), "|*.sfc:*.smc:*.zip:*.7z:*.SFC:*.SMC:*.ZIP:*.7Z:*.Sfc:*.Smc:*.Zip"};
string allFilesString = {bms::get("Browser.AllFiles").data(), "|*"};
string snesRomsString = {bmt::get("Browser.SnesRoms").data(), "|*.sfc:*.smc:*.zip:*.7z:*.SFC:*.SMC:*.ZIP:*.7Z:*.Sfc:*.Smc:*.Zip"};
string allFilesString = {bmt::get("Browser.AllFiles").data(), "|*"};
dialog.setFilters({snesRomsString, allFilesString});
superFamicom.location = openGame(dialog);
superFamicom.option = dialog.option();
@ -162,16 +162,16 @@ auto Program::load(uint id, string name, string type, vector<string> options) ->
gameBoy.location = game(1);
}
else {
dialog.setTitle(bms::get("Program.Load.LoadGameBoyRom").data());
dialog.setTitle(bmt::get("Program.Load.LoadGameBoyRom").data());
dialog.setPath(path("Games", settings.path.recent.gameBoy));
dialog.setFilters({
{
bms::get("Program.Load.GameBoyRoms").data(),
bmt::get("Program.Load.GameBoyRoms").data(),
"|*.gb:*.gbc:*.zip:*.7z:*.GB:*.GBC:*.ZIP:*.7Z:*.Gb:*.Gbc:*.Zip"
},
{
bms::get("Browser.AllFiles").data(),
bmt::get("Browser.AllFiles").data(),
"|*"
}
});
@ -196,16 +196,16 @@ auto Program::load(uint id, string name, string type, vector<string> options) ->
bsMemory.location = game(1);
}
else {
dialog.setTitle(bms::get("Program.Load.LoadBsMemoryRom").data());
dialog.setTitle(bmt::get("Program.Load.LoadBsMemoryRom").data());
dialog.setPath(path("Games", settings.path.recent.bsMemory));
dialog.setFilters({
{
bms::get("Program.Load.BsMemoryRoms").data(),
bmt::get("Program.Load.BsMemoryRoms").data(),
"|*.bs:*.zip:*.7z:*.BS:*.ZIP:*.7Z:*.Bs:*.Zip"
},
{
bms::get("Browser.AllFiles").data(),
bmt::get("Browser.AllFiles").data(),
"|*"
}
});
@ -232,16 +232,16 @@ auto Program::load(uint id, string name, string type, vector<string> options) ->
sufamiTurboA.location = game(1);
}
else {
dialog.setTitle({bms::get("Program.Load.LoadSufamiTurboRomSlot").data(), space, 'A'});
dialog.setTitle({bmt::get("Program.Load.LoadSufamiTurboRomSlot").data(), space, 'A'});
dialog.setPath(path("Games", settings.path.recent.sufamiTurboA));
dialog.setFilters({
{
bms::get("Program.Load.SufamiTurboRoms").data(),
bmt::get("Program.Load.SufamiTurboRoms").data(),
"|*.st:*.zip:*.7z:*.ST:*.ZIP:*.7Z:*.St:*.Zip"
},
{
bms::get("Browser.AllFiles").data(),
bmt::get("Browser.AllFiles").data(),
"|*"
}
});
@ -266,16 +266,16 @@ auto Program::load(uint id, string name, string type, vector<string> options) ->
sufamiTurboB.location = game(1);
}
else {
dialog.setTitle({bms::get("Program.Load.LoadSufamiTurboRomSlot").data(), space, 'B'});
dialog.setTitle({bmt::get("Program.Load.LoadSufamiTurboRomSlot").data(), space, 'B'});
dialog.setPath(path("Games", settings.path.recent.sufamiTurboB));
dialog.setFilters({
{
bms::get("Program.Load.SufamiTurboRoms").data(),
bmt::get("Program.Load.SufamiTurboRoms").data(),
"|*.st:*.zip:*.7z:*.ST:*.ZIP:*.7Z:*.St:*.Zip"
},
{
bms::get("Browser.AllFiles").data(),
bmt::get("Browser.AllFiles").data(),
"|*"
}
});
@ -343,7 +343,7 @@ auto Program::videoFrame(const uint16* data, uint pitch, uint width, uint height
if (current != previous) {
previous = current;
showFrameRate({frameCounter * (1 + emulator->frameSkip()), " ", bms::get("Common.Fps").data()});
showFrameRate({frameCounter * (1 + emulator->frameSkip()), " ", bmt::get("Common.Fps").data()});
frameCounter = 0;
}
}

View file

@ -46,7 +46,7 @@ auto Program::rewindRun() -> void {
serializer s{t.data(), t.size()}; //convert serializer::Save to serializer::Load
if (!rewind.history) {
showMessage(bms::get("Rewind.HistoryExhausted").data());
showMessage(bmt::get("Rewind.HistoryExhausted").data());
rewindReset();
}

View file

@ -99,19 +99,19 @@ auto Program::loadState(string filename) -> bool {
auto serializerRLE = Decode::RLE<1>({memory.data() + 3 * sizeof(uint), memory.size() - 3 * sizeof(uint)});
serializer s{serializerRLE.data(), (uint)serializerRLE.size()};
string message = bms::get("States.incompatibleFormat").data(); // MT.
string message = bmt::get("States.incompatibleFormat").data(); // MT.
if (!emulator->unserialize(s)) {
return showMessage(message.replace('|', prefix)), false;
}
rewindReset(); //do not allow rewinding past a state load event
string loadedMessage = bms::get("States.Loaded").data(); // MT.
string loadedMessage = bmt::get("States.Loaded").data(); // MT.
return showMessage(loadedMessage.replace('|', prefix)), true;
}
else {
string notFoundMessage = bms::get("States.NotFound").data(); // MT.
string notFoundMessage = bmt::get("States.NotFound").data(); // MT.
return showMessage(notFoundMessage.replace('|', prefix)), false;
}
}
@ -124,7 +124,7 @@ auto Program::saveState(string filename) -> bool {
string prefix = Location::file(filename);
serializer s = emulator->serialize();
string message = bms::get("States.FailedToSave").data(); // MT.
string message = bmt::get("States.FailedToSave").data(); // MT.
if (!s.size()) {
return showMessage(message.replace('|', prefix)), false;
@ -161,7 +161,7 @@ auto Program::saveState(string filename) -> bool {
directory::create(Location::path(location));
if (!file::write(location, saveState)) {
string unableMessage = bms::get("States.UnableToWriteToDisk").data(); // MT.
string unableMessage = bmt::get("States.UnableToWriteToDisk").data(); // MT.
return showMessage(unableMessage.replace('|', prefix)), false;
}
}
@ -203,12 +203,12 @@ auto Program::saveState(string filename) -> bool {
if (filename.beginsWith("Quick/")) {
presentation.updateStateMenus();
slotString.replace("Slot", bms::get("Tools.SaveState.Slot").data()); // MT.
slotString.replace("Slot", bmt::get("Tools.SaveState.Slot").data()); // MT.
}
stateManager.stateEvent(filename);
string savedMessage = string(bms::get("States.Saved").data()).replace('|', slotString); // MT.
string savedMessage = string(bmt::get("States.Saved").data()).replace('|', slotString); // MT.
return showMessage(savedMessage), true;
}

View file

@ -1,9 +1,11 @@
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/files.h"
#include "bsnes-mt/translations.h"
#include "bsnes-mt/utils.h"
#include "bsnes-mt/windows.h"
namespace bms = bsnesMt::strings;
namespace bmf = bsnesMt::files;
namespace bmt = bsnesMt::translations;
/* /MT. */
/* MT. */
@ -84,16 +86,16 @@ auto Program::updateStatus() -> void {
string frameRate;
if (!emulator->loaded()) {
frameRate = bms::get("Program.Unloaded").data();
frameRate = bmt::get("Program.Unloaded").data();
}
else if (presentation.frameAdvance.checked() && frameAdvanceLock) {
frameRate = bms::get("Tools.RunMode.FrameAdvance").data();
frameRate = bmt::get("Tools.RunMode.FrameAdvance").data();
}
else if (presentation.pauseEmulation.checked()) {
frameRate = bms::get("Program.Paused").data();
frameRate = bmt::get("Program.Paused").data();
}
else if (!focused() && inputSettings.pauseEmulation.checked()) {
frameRate = bms::get("Program.Paused").data();
frameRate = bmt::get("Program.Paused").data();
}
else {
frameRate = statusFrameRate;
@ -145,10 +147,10 @@ auto Program::captureScreenshot() -> bool {
}
}
bsnesMt::saveBgraArrayAsPngImage(data, width, height, filename.get()); // MT.
bmf::saveBgraArrayAsPngImage(data, width, height, filename.get()); // MT.
//if (Encode::BMP::create(filename, data, width << 2, width, height, /* alpha = */ false)) { // Commented-out by MT.
showMessage({bms::get("Program.CapturedScreenshot").data(), " [", Location::file(filename), "]"});
showMessage({bmt::get("Program.CapturedScreenshot").data(), " [", Location::file(filename), "]"});
return true;
//} // Commented-out by MT.

View file

@ -27,7 +27,7 @@ auto Program::updateVideoDriver(Window parent) -> void {
});
if (!video.ready()) {
string message = bms::get("Settings.Drivers.Video.failedToInitialize").data(); // MT.
string message = bmt::get("Settings.Drivers.Video.failedToInitialize").data(); // MT.
// MessageDialog(message.replace('|', settings.video.driver)).setAlignment(parent).error(); // Commented-out by MT.
bmw::showError(message.replace('|', settings.video.driver).data(), "", parent.handle()); // MT.

View file

@ -1,8 +1,8 @@
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
#include "bsnes-mt/messagebox.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
namespace bmw = bsnesMt::windows;
/* /MT. */
@ -75,8 +75,8 @@ auto Program::create() -> void {
/* MT. */
if (resetDrivers) {
bmw::showNotice(
bms::get("ResetDrivers.message"),
bms::get("ResetDrivers.message.title"),
bmt::get("ResetDrivers.message"),
bmt::get("ResetDrivers.message.title"),
presentation.handle()
);

View file

@ -4,7 +4,9 @@
IDI_APPICON ICON "bsnes-mt.ico"
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "app.Manifest"
IDR_EN_STRINGS TEXTFILE "../../../bsnes-mt/translations/en.txt"
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "app.manifest"
// Executable version information.
VS_VERSION_INFO VERSIONINFO

View file

@ -1,3 +1,6 @@
#pragma once
#define IDI_APPICON 101
#define TEXTFILE 256
#define IDR_EN_STRINGS 201

View file

@ -1,7 +1,7 @@
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
/* /MT. */
auto AudioSettings::create() -> void {
@ -10,13 +10,13 @@ auto AudioSettings::create() -> void {
char colon = ':';
effectsLabel.setFont(Font().setBold()).setText(bms::get("Settings.Audio.Effects").data());
effectsLabel.setFont(Font().setBold()).setText(bmt::get("Settings.Audio.Effects").data());
effectsLayout.setSize({3, 3});
effectsLayout.column(0).setAlignment(1.0);
skewLabel.setText({bms::get("Settings.Audio.Skew").data(), colon})
.setToolTip(bms::get("Settings.Audio.Skew.tooltip").data());
skewLabel.setText({bmt::get("Settings.Audio.Skew").data(), colon})
.setToolTip(bmt::get("Settings.Audio.Skew.tooltip").data());
skewValue.setAlignment(0.5).setToolTip(skewLabel.toolTip());
@ -32,8 +32,8 @@ auto AudioSettings::create() -> void {
})
.doChange();
volumeLabel.setText({bms::get("Settings.Audio.Volume").data(), colon})
.setToolTip(bms::get("Settings.Audio.Volume.tooltip").data());
volumeLabel.setText({bmt::get("Settings.Audio.Volume").data(), colon})
.setToolTip(bmt::get("Settings.Audio.Volume.tooltip").data());
volumeValue.setAlignment(0.5).setToolTip(volumeLabel.toolTip());
@ -46,8 +46,8 @@ auto AudioSettings::create() -> void {
})
.doChange();
balanceLabel.setText({bms::get("Settings.Audio.Balance").data(), colon})
.setToolTip(bms::get("Settings.Audio.Balance.tooltip").data());
balanceLabel.setText({bmt::get("Settings.Audio.Balance").data(), colon})
.setToolTip(bmt::get("Settings.Audio.Balance.tooltip").data());
balanceValue.setAlignment(0.5).setToolTip(balanceLabel.toolTip());
@ -60,7 +60,7 @@ auto AudioSettings::create() -> void {
})
.doChange();
muteUnfocused.setText(bms::get("Settings.Audio.MuteWhenUnfocused").data())
muteUnfocused.setText(bmt::get("Settings.Audio.MuteWhenUnfocused").data())
.setChecked(settings.audio.muteUnfocused)
.onToggle([&] {
settings.audio.muteUnfocused = muteUnfocused.checked();

View file

@ -1,29 +1,29 @@
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
/* /MT. */
auto CompatibilitySettings::create() -> void {
setCollapsible();
setVisible(false);
entropyLabel.setText(bms::get("Settings.Compatibility.entropy").data()).setFont(Font().setBold());
entropyLabel.setText(bmt::get("Settings.Compatibility.entropy").data()).setFont(Font().setBold());
entropyNone.setText(bms::get("Common.None").data())
.setToolTip(bms::get("Settings.Compatibility.entropy.None.tooltip").data())
entropyNone.setText(bmt::get("Common.None").data())
.setToolTip(bmt::get("Settings.Compatibility.entropy.None.tooltip").data())
.onActivate([&] {
settings.emulator.hack.entropy = "None";
});
entropyLow.setText(bms::get("Settings.Compatibility.entropy.Low").data())
.setToolTip(bms::get("Settings.Compatibility.entropy.Low.tooltip").data())
entropyLow.setText(bmt::get("Settings.Compatibility.entropy.Low").data())
.setToolTip(bmt::get("Settings.Compatibility.entropy.Low.tooltip").data())
.onActivate([&] {
settings.emulator.hack.entropy = "Low";
});
entropyHigh.setText(bms::get("Settings.Compatibility.entropy.High").data())
.setToolTip(bms::get("Settings.Compatibility.entropy.High.tooltip").data())
entropyHigh.setText(bmt::get("Settings.Compatibility.entropy.High").data())
.setToolTip(bmt::get("Settings.Compatibility.entropy.High.tooltip").data())
.onActivate([&] {
settings.emulator.hack.entropy = "High";
});
@ -40,32 +40,32 @@ auto CompatibilitySettings::create() -> void {
entropyHigh.setChecked();
}
cpuLabel.setFont(Font().setBold()).setText({"CPU (", bms::get("Settings.Compatibility.cpu.Processor").data(), ")"});
cpuLabel.setFont(Font().setBold()).setText({"CPU (", bmt::get("Settings.Compatibility.cpu.Processor").data(), ")"});
fastMath.setText(bms::get("Settings.Compatibility.cpu.FastMath").data())
.setToolTip(bms::get("Settings.Compatibility.cpu.FastMath.tooltip").data())
fastMath.setText(bmt::get("Settings.Compatibility.cpu.FastMath").data())
.setToolTip(bmt::get("Settings.Compatibility.cpu.FastMath.tooltip").data())
.setChecked(settings.emulator.hack.cpu.fastMath).onToggle([&] {
settings.emulator.hack.cpu.fastMath = fastMath.checked();
emulator->configure("Hacks/CPU/FastMath", settings.emulator.hack.cpu.fastMath);
});
ppuLabel.setFont(Font().setBold()).setText({"PPU (", bms::get("Settings.Compatibility.ppu.Video").data(), ")"});
ppuLabel.setFont(Font().setBold()).setText({"PPU (", bmt::get("Settings.Compatibility.ppu.Video").data(), ")"});
noVRAMBlocking.setText(bms::get("Settings.Compatibility.ppu.NoVramBlocking").data())
.setToolTip(bms::get("Settings.Compatibility.ppu.NoVramBlocking.tooltip").data())
noVRAMBlocking.setText(bmt::get("Settings.Compatibility.ppu.NoVramBlocking").data())
.setToolTip(bmt::get("Settings.Compatibility.ppu.NoVramBlocking.tooltip").data())
.setChecked(settings.emulator.hack.ppu.noVRAMBlocking).onToggle([&] {
settings.emulator.hack.ppu.noVRAMBlocking = noVRAMBlocking.checked();
emulator->configure("Hacks/PPU/NoVRAMBlocking", settings.emulator.hack.ppu.noVRAMBlocking);
});
dspLabel.setFont(Font().setBold()).setText({"DSP (", bms::get("Settings.Compatibility.dsp.Audio").data(), ")"});
dspLabel.setFont(Font().setBold()).setText({"DSP (", bmt::get("Settings.Compatibility.dsp.Audio").data(), ")"});
echoShadow.setText(bms::get("Settings.Compatibility.dsp.EchoShadowRam").data())
.setToolTip(bms::get("Settings.Compatibility.dsp.EchoShadowRam.tooltip").data())
echoShadow.setText(bmt::get("Settings.Compatibility.dsp.EchoShadowRam").data())
.setToolTip(bmt::get("Settings.Compatibility.dsp.EchoShadowRam.tooltip").data())
.setChecked(settings.emulator.hack.dsp.echoShadow).onToggle([&] {
settings.emulator.hack.dsp.echoShadow = echoShadow.checked();
//not a run-time setting: do not call emulator->configure() here.
});
note.setText(bms::get("Settings.noteGameRestart").data());
note.setText(bmt::get("Settings.noteGameRestart").data());
}

View file

@ -1,8 +1,8 @@
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
#include "bsnes-mt/messagebox.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
namespace bmw = bsnesMt::windows;
/* /MT. */
@ -12,57 +12,57 @@ auto DriverSettings::create() -> void {
/* MT. */
char colon = ':';
const string driverString = {bms::get("Settings.Drivers.Driver").data(), colon};
const string changeString = bms::get("Settings.Drivers.Change").data();
const string driverString = {bmt::get("Settings.Drivers.Driver").data(), colon};
const string changeString = bmt::get("Settings.Drivers.Change").data();
/* /MT. */
videoLabel.setText(bms::get("Common.Video").data()).setFont(Font().setBold());
videoLabel.setText(bmt::get("Common.Video").data()).setFont(Font().setBold());
videoDriverLabel.setText(driverString);
videoDriverOption.onChange([&] {
/* MT. */
// Crashes (without `.data()`) or works incorrectly (with `.data()`) with prepared "Change", "Reload", "None", and translated "None" strings.
string driverTranslated = videoDriverOption.selected().text();
string driver = driverTranslated == bms::get("Common.None").data() ? "None" : driverTranslated;
string driver = driverTranslated == bmt::get("Common.None").data() ? "None" : driverTranslated;
/* /MT. */
videoDriverUpdate.setText(driver == video.driver() ? bms::get("Settings.Drivers.Reload").data() : bms::get("Settings.Drivers.Change").data());
videoDriverUpdate.setText(driver == video.driver() ? bmt::get("Settings.Drivers.Reload").data() : bmt::get("Settings.Drivers.Change").data());
});
videoDriverUpdate.setText(changeString).onActivate([&] {
videoDriverChange();
});
videoMonitorLabel.setText({bms::get("Settings.Drivers.Video.FullScreenMonitor").data(), colon})
.setToolTip(bms::get("Settings.Drivers.Video.FullScreenMonitor.tooltip").data());
videoMonitorLabel.setText({bmt::get("Settings.Drivers.Video.FullScreenMonitor").data(), colon})
.setToolTip(bmt::get("Settings.Drivers.Video.FullScreenMonitor.tooltip").data());
videoMonitorOption.onChange([&] {
videoMonitorChange();
});
videoFormatLabel.setText({bms::get("Settings.Drivers.Video.Format").data(), colon});
videoFormatLabel.setText({bmt::get("Settings.Drivers.Video.Format").data(), colon});
videoFormatOption.onChange([&] {
videoFormatChange();
});
videoExclusiveToggle.setText(bms::get("Settings.Drivers.ExclusiveMode").data())
.setToolTip(bms::get("Settings.Drivers.Video.ExclusiveMode.tooltip").data())
videoExclusiveToggle.setText(bmt::get("Settings.Drivers.ExclusiveMode").data())
.setToolTip(bmt::get("Settings.Drivers.Video.ExclusiveMode.tooltip").data())
.onToggle([&] {
settings.video.exclusive = videoExclusiveToggle.checked();
program.updateVideoExclusive();
});
videoBlockingToggle.setText(bms::get("Settings.Drivers.Synchronize").data())
.setToolTip(bms::get("Settings.Drivers.Video.Synchronize.tooltip").data())
videoBlockingToggle.setText(bmt::get("Settings.Drivers.Synchronize").data())
.setToolTip(bmt::get("Settings.Drivers.Video.Synchronize.tooltip").data())
.onToggle([&] {
settings.video.blocking = videoBlockingToggle.checked();
program.updateVideoBlocking();
presentation.speedMenu.setEnabled(!videoBlockingToggle.checked() && audioBlockingToggle.checked());
});
videoFlushToggle.setText(bms::get("Settings.Drivers.Video.GpuSync").data())
.setToolTip(bms::get("Settings.Drivers.Video.GpuSync.tooltip").data())
videoFlushToggle.setText(bmt::get("Settings.Drivers.Video.GpuSync").data())
.setToolTip(bmt::get("Settings.Drivers.Video.GpuSync.tooltip").data())
.onToggle([&] {
settings.video.flush = videoFlushToggle.checked();
program.updateVideoFlush();
@ -72,57 +72,57 @@ auto DriverSettings::create() -> void {
videoSpacer.setColor(spacerColor);
audioLabel.setText(bms::get("Common.Audio").data()).setFont(Font().setBold());
audioLabel.setText(bmt::get("Common.Audio").data()).setFont(Font().setBold());
audioDriverLabel.setText(driverString);
audioDriverOption.onChange([&] {
/* MT. */
string driverTranslated = audioDriverOption.selected().text();
string driver = driverTranslated == bms::get("Common.None").data() ? "None" : driverTranslated;
string driver = driverTranslated == bmt::get("Common.None").data() ? "None" : driverTranslated;
/* /MT. */
audioDriverUpdate.setText(driver == audio.driver() ? bms::get("Settings.Drivers.Reload").data() : bms::get("Settings.Drivers.Change").data());
audioDriverUpdate.setText(driver == audio.driver() ? bmt::get("Settings.Drivers.Reload").data() : bmt::get("Settings.Drivers.Change").data());
});
audioDriverUpdate.setText(changeString).onActivate([&] {
audioDriverChange();
});
audioDeviceLabel.setText({bms::get("Settings.Drivers.Audio.OutputDevice").data(), colon});
audioDeviceLabel.setText({bmt::get("Settings.Drivers.Audio.OutputDevice").data(), colon});
audioDeviceOption.onChange([&] {
audioDeviceChange();
});
audioFrequencyLabel.setText({bms::get("Settings.Drivers.Audio.SampleRate").data(), colon});
audioFrequencyLabel.setText({bmt::get("Settings.Drivers.Audio.SampleRate").data(), colon});
audioFrequencyOption.onChange([&] {
audioFrequencyChange();
});
audioLatencyLabel.setText({bms::get("Settings.Drivers.Audio.Latency").data(), colon});
audioLatencyLabel.setText({bmt::get("Settings.Drivers.Audio.Latency").data(), colon});
audioLatencyOption.onChange([&] {
audioLatencyChange();
});
audioExclusiveToggle.setText(bms::get("Settings.Drivers.ExclusiveMode").data())
.setToolTip(bms::get("Settings.Drivers.Audio.ExclusiveMode.tooltip").data())
audioExclusiveToggle.setText(bmt::get("Settings.Drivers.ExclusiveMode").data())
.setToolTip(bmt::get("Settings.Drivers.Audio.ExclusiveMode.tooltip").data())
.onToggle([&] {
settings.audio.exclusive = audioExclusiveToggle.checked();
program.updateAudioExclusive();
});
audioBlockingToggle.setText(bms::get("Settings.Drivers.Synchronize").data())
.setToolTip(bms::get("Settings.Drivers.Audio.Synchronize.tooltip").data())
audioBlockingToggle.setText(bmt::get("Settings.Drivers.Synchronize").data())
.setToolTip(bmt::get("Settings.Drivers.Audio.Synchronize.tooltip").data())
.onToggle([&] {
settings.audio.blocking = audioBlockingToggle.checked();
program.updateAudioBlocking();
presentation.speedMenu.setEnabled(!videoBlockingToggle.checked() && audioBlockingToggle.checked());
});
audioDynamicToggle.setText(bms::get("Settings.Drivers.Audio.DynamicRate").data())
.setToolTip(bms::get("Settings.Drivers.Audio.DynamicRate.tooltip").data())
audioDynamicToggle.setText(bmt::get("Settings.Drivers.Audio.DynamicRate").data())
.setToolTip(bmt::get("Settings.Drivers.Audio.DynamicRate.tooltip").data())
.onToggle([&] {
settings.audio.dynamic = audioDynamicToggle.checked();
program.updateAudioDynamic();
@ -130,44 +130,44 @@ auto DriverSettings::create() -> void {
audioSpacer.setColor(spacerColor);
inputLabel.setText(bms::get("Settings.Input").data()).setFont(Font().setBold());
inputLabel.setText(bmt::get("Settings.Input").data()).setFont(Font().setBold());
inputDriverLabel.setText(driverString);
inputDriverOption.onChange([&] {
/* MT. */
string driverTranslated = inputDriverOption.selected().text();
string driver = driverTranslated == bms::get("Common.None").data() ? "None" : driverTranslated;
string driver = driverTranslated == bmt::get("Common.None").data() ? "None" : driverTranslated;
/* /MT. */
inputDriverUpdate.setText(driver == input.driver() ? bms::get("Settings.Drivers.Reload").data() : bms::get("Settings.Drivers.Change").data());
inputDriverUpdate.setText(driver == input.driver() ? bmt::get("Settings.Drivers.Reload").data() : bmt::get("Settings.Drivers.Change").data());
});
inputDriverUpdate.setText(changeString)
.setToolTip(bms::get("Settings.Drivers.Input.Reload.tooltip").data())
.setToolTip(bmt::get("Settings.Drivers.Input.Reload.tooltip").data())
.onActivate([&] {
inputDriverChange();
});
inputSpacer.setColor(spacerColor);
syncModeLabel.setText({bms::get("Settings.Drivers.syncModePresets").data(), colon}).setFont(Font().setBold());
syncModeLabel.setText({bmt::get("Settings.Drivers.syncModePresets").data(), colon}).setFont(Font().setBold());
syncModeRequirements.setText(
bms::get("Settings.Drivers.syncModePresets.requirements").data()
bmt::get("Settings.Drivers.syncModePresets.requirements").data()
);
adaptiveSyncMode.setText(bms::get("Settings.Drivers.syncModePresets.AdaptiveSync").data()).onActivate([&] {
adaptiveSyncMode.setText(bmt::get("Settings.Drivers.syncModePresets.AdaptiveSync").data()).onActivate([&] {
if (!audioBlockingToggle.enabled()) {
/* // Commented-out by MT.
return (void)MessageDialog().setAlignment(settingsWindow).setTitle(bms::get("Common.Failure").data()).setText({
bms::get("Settings.Drivers.syncModePresets.AdaptiveSync.failure").data()
return (void)MessageDialog().setAlignment(settingsWindow).setTitle(bmt::get("Common.Failure").data()).setText({
bmt::get("Settings.Drivers.syncModePresets.AdaptiveSync.failure").data()
}).error();
*/
/* MT. */
bmw::showError(
bms::get("Settings.Drivers.syncModePresets.AdaptiveSync.failure"),
bms::get("Common.Failure"),
bmt::get("Settings.Drivers.syncModePresets.AdaptiveSync.failure"),
bmt::get("Common.Failure"),
settingsWindow.handle()
);
@ -192,32 +192,32 @@ auto DriverSettings::create() -> void {
}
/* // Commented-out by MT.
MessageDialog().setAlignment(settingsWindow).setTitle(bms::get("Common.Success").data()).setText({
bms::get("Settings.Drivers.syncModePresets.AdaptiveSync.success").data()
MessageDialog().setAlignment(settingsWindow).setTitle(bmt::get("Common.Success").data()).setText({
bmt::get("Settings.Drivers.syncModePresets.AdaptiveSync.success").data()
}).information();
*/
/* MT. */
bmw::showInfo(
bms::get("Settings.Drivers.syncModePresets.AdaptiveSync.success"),
bms::get("Common.Success"),
bmt::get("Settings.Drivers.syncModePresets.AdaptiveSync.success"),
bmt::get("Common.Success"),
settingsWindow.handle()
);
/* /MT. */
});
dynamicRateControlMode.setText(bms::get("Settings.Drivers.syncModePresets.DynamicRateControl").data()).onActivate([&] {
dynamicRateControlMode.setText(bmt::get("Settings.Drivers.syncModePresets.DynamicRateControl").data()).onActivate([&] {
if (!videoBlockingToggle.enabled() || !audioDynamicToggle.enabled()) {
/* // Commented-out by MT.
return (void)MessageDialog().setAlignment(settingsWindow).setTitle(bms::get("Common.Failure").data()).setText({
bms::get("Settings.Drivers.syncModePresets.DynamicRateControl.failure").data()
return (void)MessageDialog().setAlignment(settingsWindow).setTitle(bmt::get("Common.Failure").data()).setText({
bmt::get("Settings.Drivers.syncModePresets.DynamicRateControl.failure").data()
}).error();
*/
/* MT. */
bmw::showError(
bms::get("Settings.Drivers.syncModePresets.DynamicRateControl.failure"),
bms::get("Common.Failure"),
bmt::get("Settings.Drivers.syncModePresets.DynamicRateControl.failure"),
bmt::get("Common.Failure"),
settingsWindow.handle()
);
@ -242,15 +242,15 @@ auto DriverSettings::create() -> void {
}
/* // Commented-out by MT.
MessageDialog().setAlignment(settingsWindow).setTitle(bms::get("Common.Success").data()).setText({
bms::get("Settings.Drivers.syncModePresets.DynamicRateControl.success").data()
MessageDialog().setAlignment(settingsWindow).setTitle(bmt::get("Common.Success").data()).setText({
bmt::get("Settings.Drivers.syncModePresets.DynamicRateControl.success").data()
}).information();
*/
/* MT. */
bmw::showInfo(
bms::get("Settings.Drivers.syncModePresets.DynamicRateControl.success"),
bms::get("Common.Success"),
bmt::get("Settings.Drivers.syncModePresets.DynamicRateControl.success"),
bmt::get("Common.Success"),
settingsWindow.handle()
);
/* /MT. */
@ -264,7 +264,7 @@ auto DriverSettings::videoDriverChanged() -> void {
/* MT. */
string none = "None";
string noneTranslated = bms::get("Common.None").data();
string noneTranslated = bmt::get("Common.None").data();
string activeDriver = video.driver();
string activeDriverTranslated = activeDriver == none ? noneTranslated : activeDriver;
/* /MT. */
@ -278,7 +278,7 @@ auto DriverSettings::videoDriverChanged() -> void {
}
}
videoDriverActive.setText({bms::get("Settings.Drivers.ActiveDriver").data(), ": ", activeDriverTranslated});
videoDriverActive.setText({bmt::get("Settings.Drivers.ActiveDriver").data(), ": ", activeDriverTranslated});
videoDriverOption.doChange();
videoMonitorChanged();
videoFormatChanged();
@ -293,15 +293,15 @@ auto DriverSettings::videoDriverChange() -> void {
/* MT. */
string itemText = item.text();
bool isNone = itemText == bms::get("Common.None").data();
bool isNone = itemText == bmt::get("Common.None").data();
/* /MT. */
settings.video.driver = isNone ? "None" : itemText;
/* // Commented-out by MT.
if (!emulator->loaded() || isNone || MessageDialog(
bms::get("Settings.Drivers.changeConfirm").data()
).setAlignment(*settingsWindow).question({bms::get("Common.Yes").data(), bms::get("Common.No").data()}) == bms::get("Common.Yes").data()) {
bmt::get("Settings.Drivers.changeConfirm").data()
).setAlignment(*settingsWindow).question({bmt::get("Common.Yes").data(), bmt::get("Common.No").data()}) == bmt::get("Common.Yes").data()) {
*/
if (!emulator->loaded() || isNone || bmw::confirmById("Settings.Drivers.changeConfirm", settingsWindow->handle())) { // MT.
@ -369,7 +369,7 @@ auto DriverSettings::audioDriverChanged() -> void {
/* MT. */
string none = "None";
string noneTranslated = bms::get("Common.None").data();
string noneTranslated = bmt::get("Common.None").data();
string activeDriver = audio.driver();
string activeDriverTranslated = activeDriver == none ? noneTranslated : activeDriver;
/* /MT. */
@ -383,7 +383,7 @@ auto DriverSettings::audioDriverChanged() -> void {
}
}
audioDriverActive.setText({bms::get("Settings.Drivers.ActiveDriver").data(), ": ", activeDriverTranslated});
audioDriverActive.setText({bmt::get("Settings.Drivers.ActiveDriver").data(), ": ", activeDriverTranslated});
audioDriverOption.doChange();
audioDeviceChanged();
audioFrequencyChanged();
@ -399,15 +399,15 @@ auto DriverSettings::audioDriverChange() -> void {
/* MT. */
string itemText = item.text();
bool isNone = itemText == bms::get("Common.None").data();
bool isNone = itemText == bmt::get("Common.None").data();
/* /MT. */
settings.audio.driver = isNone ? "None" : itemText;
/* // Commented-out by MT.
if (!emulator->loaded() || isNone || MessageDialog(
bms::get("Settings.Drivers.changeConfirm").data()
).setAlignment(*settingsWindow).question({bms::get("Common.Yes").data(), bms::get("Common.No").data()}) == bms::get("Common.Yes").data()) {
bmt::get("Settings.Drivers.changeConfirm").data()
).setAlignment(*settingsWindow).question({bmt::get("Common.Yes").data(), bmt::get("Common.No").data()}) == bmt::get("Common.Yes").data()) {
*/
if (!emulator->loaded() || isNone || bmw::confirmById("Settings.Drivers.changeConfirm", settingsWindow->handle())) { // MT.
@ -427,7 +427,7 @@ auto DriverSettings::audioDeviceChanged() -> void {
/* MT. */
string defaultString = "Default";
string defaultTranslated = bms::get("Common.Default").data();
string defaultTranslated = bmt::get("Common.Default").data();
string activeDevice = audio.device();
string activeDeviceTranslated = activeDevice == defaultString ? defaultTranslated : activeDevice;
/* /MT. */
@ -450,7 +450,7 @@ auto DriverSettings::audioDeviceChange() -> void {
/* MT. */
string defaultString = "Default";
string defaultTranslated = bms::get("Common.Default").data();
string defaultTranslated = bmt::get("Common.Default").data();
string itemText = item.text();
/* /MT. */
@ -465,7 +465,7 @@ auto DriverSettings::audioFrequencyChanged() -> void {
for (auto& frequency : audio.hasFrequencies()) {
ComboButtonItem item{&audioFrequencyOption};
item.setText({frequency, ' ', bms::get("Common.Hz").data()});
item.setText({frequency, ' ', bmt::get("Common.Hz").data()});
if (frequency == audio.frequency()) {
item.setSelected();
@ -511,7 +511,7 @@ auto DriverSettings::inputDriverChanged() -> void {
/* MT. */
string none = "None";
string noneTranslated = bms::get("Common.None").data();
string noneTranslated = bmt::get("Common.None").data();
string activeDriver = input.driver();
string activeDriverTranslated = activeDriver == none ? noneTranslated : activeDriver;
/* /MT. */
@ -525,7 +525,7 @@ auto DriverSettings::inputDriverChanged() -> void {
}
}
inputDriverActive.setText({bms::get("Settings.Drivers.ActiveDriver").data(), ": ", activeDriverTranslated});
inputDriverActive.setText({bmt::get("Settings.Drivers.ActiveDriver").data(), ": ", activeDriverTranslated});
inputDriverOption.doChange();
setGeometry(geometry());
}
@ -535,15 +535,15 @@ auto DriverSettings::inputDriverChange() -> void {
/* MT. */
string itemText = item.text();
bool isNone = itemText == bms::get("Common.None").data();
bool isNone = itemText == bmt::get("Common.None").data();
/* /MT. */
settings.input.driver = isNone ? "None" : itemText;
/* // Commented-out by MT.
if (!emulator->loaded() || isNone || MessageDialog(
bms::get("Settings.Drivers.changeConfirm").data()
).setAlignment(*settingsWindow).question({bms::get("Common.Yes").data(), bms::get("Common.No").data()}) == bms::get("Common.Yes").data()) {
bmt::get("Settings.Drivers.changeConfirm").data()
).setAlignment(*settingsWindow).question({bmt::get("Common.Yes").data(), bmt::get("Common.No").data()}) == bmt::get("Common.Yes").data()) {
*/
if (!emulator->loaded() || isNone || bmw::confirmById("Settings.Drivers.changeConfirm", settingsWindow->handle())) { // MT.

View file

@ -1,28 +1,28 @@
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
/* /MT. */
auto EmulatorSettings::create() -> void {
setCollapsible();
setVisible(false);
optionsLabel.setText(bms::get("Settings.Emulator.General").data()).setFont(Font().setBold());
optionsLabel.setText(bmt::get("Settings.Emulator.General").data()).setFont(Font().setBold());
warnOnUnverifiedGames.setText(bms::get("Settings.Emulator.General.warnOnUnverifiedGames").data())
warnOnUnverifiedGames.setText(bmt::get("Settings.Emulator.General.warnOnUnverifiedGames").data())
.setChecked(settings.emulator.warnOnUnverifiedGames)
.onToggle([&] {
settings.emulator.warnOnUnverifiedGames = warnOnUnverifiedGames.checked();
});
autoSaveMemory.setText(bms::get("Settings.Emulator.General.autoSaveMemory").data())
autoSaveMemory.setText(bmt::get("Settings.Emulator.General.autoSaveMemory").data())
.setChecked(settings.emulator.autoSaveMemory.enable)
.onToggle([&] {
settings.emulator.autoSaveMemory.enable = autoSaveMemory.checked();
});
autoSaveStateOnUnload.setText(bms::get("Settings.Emulator.General.autoSaveStateOnUnload").data())
autoSaveStateOnUnload.setText(bmt::get("Settings.Emulator.General.autoSaveStateOnUnload").data())
.setChecked(settings.emulator.autoSaveStateOnUnload)
.onToggle([&] {
settings.emulator.autoSaveStateOnUnload = autoSaveStateOnUnload.checked();
@ -36,13 +36,13 @@ auto EmulatorSettings::create() -> void {
})
.doToggle();
autoLoadStateOnLoad.setText(bms::get("Settings.Emulator.General.AutoResumeOnLoad").data())
autoLoadStateOnLoad.setText(bmt::get("Settings.Emulator.General.AutoResumeOnLoad").data())
.setChecked(settings.emulator.autoLoadStateOnLoad)
.onToggle([&] {
settings.emulator.autoLoadStateOnLoad = autoLoadStateOnLoad.checked();
});
nativeFileDialogs.setText(bms::get("Settings.Emulator.General.UseNativeFileDialogs").data())
nativeFileDialogs.setText(bmt::get("Settings.Emulator.General.UseNativeFileDialogs").data())
.setChecked(settings.general.nativeFileDialogs)
.onToggle([&] {
settings.general.nativeFileDialogs = nativeFileDialogs.checked();
@ -52,21 +52,21 @@ auto EmulatorSettings::create() -> void {
optionsSpacer.setColor(spacerColor);
fastForwardLabel.setText(bms::get("Settings.Emulator.FastForward").data()).setFont(Font().setBold());
fastForwardLabel.setText(bmt::get("Settings.Emulator.FastForward").data()).setFont(Font().setBold());
char colon = ':';
frameSkipLabel.setText({bms::get("Settings.Emulator.FastForward.FrameSkip").data(), colon})
.setToolTip(bms::get("Settings.Emulator.FastForward.FrameSkip.tooltip").data());
frameSkipLabel.setText({bmt::get("Settings.Emulator.FastForward.FrameSkip").data(), colon})
.setToolTip(bmt::get("Settings.Emulator.FastForward.FrameSkip.tooltip").data());
/* MT. */
string noneString = bms::get("Common.None").data();
string framesString = bms::get("Settings.Emulator.FastForward.FrameSkip.Frames").data();
string frames2to4String = bms::get("Settings.Emulator.FastForward.FrameSkip.Frames2to4").data();
string noneString = bmt::get("Common.None").data();
string framesString = bmt::get("Settings.Emulator.FastForward.FrameSkip.Frames").data();
string frames2to4String = bmt::get("Settings.Emulator.FastForward.FrameSkip.Frames2to4").data();
/* /MT. */
frameSkipAmount.append(ComboButtonItem().setText(noneString));
frameSkipAmount.append(ComboButtonItem().setText({"1 ", bms::get("Settings.Common.FrameLowercase").data()}));
frameSkipAmount.append(ComboButtonItem().setText({"1 ", bmt::get("Settings.Common.FrameLowercase").data()}));
/* MT. */
for (uint8_t i = 2; i < 5; i++) {
@ -84,8 +84,8 @@ auto EmulatorSettings::create() -> void {
settings.fastForward.frameSkip = frameSkipAmount.selected().offset();
});
limiterLabel.setText({bms::get("Settings.Emulator.FastForward.Limiter").data(), colon})
.setToolTip(bms::get("Settings.Emulator.FastForward.Limiter.tooltip").data());
limiterLabel.setText({bmt::get("Settings.Emulator.FastForward.Limiter").data(), colon})
.setToolTip(bmt::get("Settings.Emulator.FastForward.Limiter.tooltip").data());
limiterAmount.append(ComboButtonItem().setText(noneString));
@ -104,7 +104,7 @@ auto EmulatorSettings::create() -> void {
settings.fastForward.limiter = index == 0 ? 0 : index + 1; // MT.
});
fastForwardMute.setText(bms::get("Settings.Emulator.FastForward.mute").data())
fastForwardMute.setText(bmt::get("Settings.Emulator.FastForward.mute").data())
.setChecked(settings.fastForward.mute)
.onToggle([&] {
settings.fastForward.mute = fastForwardMute.checked();
@ -112,12 +112,12 @@ auto EmulatorSettings::create() -> void {
fastForwardSpacer.setColor(spacerColor);
rewindLabel.setText(bms::get("Settings.Emulator.Rewind").data()).setFont(Font().setBold());
rewindLabel.setText(bmt::get("Settings.Emulator.Rewind").data()).setFont(Font().setBold());
string everyString = bms::get("Settings.Emulator.Rewind.Frequency.everyFrames").data(); // MT.
string everyString = bmt::get("Settings.Emulator.Rewind.Frequency.everyFrames").data(); // MT.
rewindFrequencyLabel.setText({bms::get("Settings.Emulator.Rewind.Frequency").data(), colon});
rewindFrequencyOption.append(ComboButtonItem().setText(bms::get("Common.Disabled").data()));
rewindFrequencyLabel.setText({bmt::get("Settings.Emulator.Rewind.Frequency").data(), colon});
rewindFrequencyOption.append(ComboButtonItem().setText(bmt::get("Common.Disabled").data()));
/* MT. */
for (uint8_t number = 10; number < 70; number += 10) {
@ -134,9 +134,9 @@ auto EmulatorSettings::create() -> void {
program.rewindReset();
});
string statesString = bms::get("Settings.Emulator.Rewind.Length.states").data(); // MT.
string statesString = bmt::get("Settings.Emulator.Rewind.Length.states").data(); // MT.
rewindLengthLabel.setText({bms::get("Settings.Emulator.Rewind.Length").data(), colon});
rewindLengthLabel.setText({bmt::get("Settings.Emulator.Rewind.Length").data(), colon});
auto length = settings.rewind.length; // MT.
@ -159,7 +159,7 @@ auto EmulatorSettings::create() -> void {
program.rewindReset();
});
rewindMute.setText(bms::get("Settings.Emulator.Rewind.mute").data())
rewindMute.setText(bmt::get("Settings.Emulator.Rewind.mute").data())
.setChecked(settings.rewind.mute)
.onToggle([&] {
settings.rewind.mute = rewindMute.checked();

View file

@ -1,7 +1,7 @@
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
/* /MT. */
auto EnhancementSettings::create() -> void {
@ -9,32 +9,32 @@ auto EnhancementSettings::create() -> void {
setVisible(false);
/* MT. */
string framesString = bms::get("Settings.Enhancements.RunAhead.Frames").data();
string framesString = bmt::get("Settings.Enhancements.RunAhead.Frames").data();
char space = ' ';
/* /MT. */
runAheadLabel.setText(bms::get("Settings.Enhancements.RunAhead").data()).setFont(Font().setBold());
runAheadLabel.setText(bmt::get("Settings.Enhancements.RunAhead").data()).setFont(Font().setBold());
runAhead0.setText(bms::get("Common.Disabled").data()).onActivate([&] {
runAhead0.setText(bmt::get("Common.Disabled").data()).onActivate([&] {
settings.emulator.runAhead.frames = 0;
});
runAhead1.setText({bms::get("Settings.Enhancements.RunAhead.One").data(), space, bms::get("Settings.Common.FrameLowercase").data()})
runAhead1.setText({bmt::get("Settings.Enhancements.RunAhead.One").data(), space, bmt::get("Settings.Common.FrameLowercase").data()})
.onActivate([&] {
settings.emulator.runAhead.frames = 1;
});
runAhead2.setText({bms::get("Settings.Enhancements.RunAhead.Two").data(), space, framesString})
runAhead2.setText({bmt::get("Settings.Enhancements.RunAhead.Two").data(), space, framesString})
.onActivate([&] {
settings.emulator.runAhead.frames = 2;
});
runAhead3.setText({bms::get("Settings.Enhancements.RunAhead.Three").data(), space, framesString})
runAhead3.setText({bmt::get("Settings.Enhancements.RunAhead.Three").data(), space, framesString})
.onActivate([&] {
settings.emulator.runAhead.frames = 3;
});
runAhead4.setText({bms::get("Settings.Enhancements.RunAhead.Four").data(), space, framesString})
runAhead4.setText({bmt::get("Settings.Enhancements.RunAhead.Four").data(), space, framesString})
.onActivate([&] {
settings.emulator.runAhead.frames = 4;
});
@ -61,7 +61,7 @@ auto EnhancementSettings::create() -> void {
runAheadSpacer.setColor(spacerColor);
overclockingLabel.setText(bms::get("Settings.Enhancements.Overclocking").data()).setFont(Font().setBold());
overclockingLabel.setText(bmt::get("Settings.Enhancements.Overclocking").data()).setFont(Font().setBold());
overclockingLayout.setSize({3, 3});
overclockingLayout.column(0).setAlignment(1.0);
@ -99,9 +99,9 @@ auto EnhancementSettings::create() -> void {
overclockingSpacer.setColor(spacerColor);
ppuLabel.setText({"PPU (", bms::get("Settings.Enhancements.Ppu.Video").data(), ")"}).setFont(Font().setBold());
ppuLabel.setText({"PPU (", bmt::get("Settings.Enhancements.Ppu.Video").data(), ")"}).setFont(Font().setBold());
fastPPU.setText(bms::get("Settings.Enhancements.FastMode").data())
fastPPU.setText(bmt::get("Settings.Enhancements.FastMode").data())
.setChecked(settings.emulator.hack.ppu.fast)
.onToggle([&] {
bool checked = fastPPU.checked(); // MT.
@ -113,21 +113,21 @@ auto EnhancementSettings::create() -> void {
})
.doToggle();
deinterlace.setText(bms::get("Settings.Enhancements.Ppu.Deinterlace").data())
deinterlace.setText(bmt::get("Settings.Enhancements.Ppu.Deinterlace").data())
.setChecked(settings.emulator.hack.ppu.deinterlace)
.onToggle([&] {
settings.emulator.hack.ppu.deinterlace = deinterlace.checked();
emulator->configure("Hacks/PPU/Deinterlace", settings.emulator.hack.ppu.deinterlace);
});
noSpriteLimit.setText(bms::get("Settings.Enhancements.Ppu.NoSpriteLimit").data())
noSpriteLimit.setText(bmt::get("Settings.Enhancements.Ppu.NoSpriteLimit").data())
.setChecked(settings.emulator.hack.ppu.noSpriteLimit)
.onToggle([&] {
settings.emulator.hack.ppu.noSpriteLimit = noSpriteLimit.checked();
});
mode7Label.setText({"HD Mode 7 (", bms::get("Settings.Enhancements.hdMode7.FastPpuOnly").data(), ")"}).setFont(Font().setBold());
mode7ScaleLabel.setText({bms::get("Settings.Enhancements.hdMode7.Scale").data(), ':'});
mode7Label.setText({"HD Mode 7 (", bmt::get("Settings.Enhancements.hdMode7.FastPpuOnly").data(), ")"}).setFont(Font().setBold());
mode7ScaleLabel.setText({bmt::get("Settings.Enhancements.hdMode7.Scale").data(), ':'});
/* MT. */
for (uint8_t i = 1; i < 9; i++) {
@ -146,67 +146,67 @@ auto EnhancementSettings::create() -> void {
emulator->configure("Hacks/PPU/Mode7/Scale", settings.emulator.hack.ppu.mode7.scale);
});
mode7Perspective.setText(bms::get("Settings.Enhancements.hdMode7.PerspectiveCorrection").data())
mode7Perspective.setText(bmt::get("Settings.Enhancements.hdMode7.PerspectiveCorrection").data())
.setChecked(settings.emulator.hack.ppu.mode7.perspective)
.onToggle([&] {
settings.emulator.hack.ppu.mode7.perspective = mode7Perspective.checked();
emulator->configure("Hacks/PPU/Mode7/Perspective", settings.emulator.hack.ppu.mode7.perspective);
});
mode7Supersample.setText(bms::get("Settings.Enhancements.hdMode7.Supersampling").data())
mode7Supersample.setText(bmt::get("Settings.Enhancements.hdMode7.Supersampling").data())
.setChecked(settings.emulator.hack.ppu.mode7.supersample)
.onToggle([&] {
settings.emulator.hack.ppu.mode7.supersample = mode7Supersample.checked();
emulator->configure("Hacks/PPU/Mode7/Supersample", settings.emulator.hack.ppu.mode7.supersample);
});
mode7Mosaic.setText(bms::get("Settings.Enhancements.hdMode7.HdToSdMosaic").data())
mode7Mosaic.setText(bmt::get("Settings.Enhancements.hdMode7.HdToSdMosaic").data())
.setChecked(settings.emulator.hack.ppu.mode7.mosaic)
.onToggle([&] {
settings.emulator.hack.ppu.mode7.mosaic = mode7Mosaic.checked();
emulator->configure("Hacks/PPU/Mode7/Mosaic", settings.emulator.hack.ppu.mode7.mosaic);
});
dspLabel.setText({"DSP (", bms::get("Settings.Enhancements.Dsp.Audio").data(), ")"}).setFont(Font().setBold());
dspLabel.setText({"DSP (", bmt::get("Settings.Enhancements.Dsp.Audio").data(), ")"}).setFont(Font().setBold());
fastDSP.setText(bms::get("Settings.Enhancements.FastMode").data())
fastDSP.setText(bmt::get("Settings.Enhancements.FastMode").data())
.setChecked(settings.emulator.hack.dsp.fast)
.onToggle([&] {
settings.emulator.hack.dsp.fast = fastDSP.checked();
emulator->configure("Hacks/DSP/Fast", settings.emulator.hack.dsp.fast);
});
cubicInterpolation.setText(bms::get("Settings.Enhancements.Dsp.CubicInterpolation").data())
cubicInterpolation.setText(bmt::get("Settings.Enhancements.Dsp.CubicInterpolation").data())
.setChecked(settings.emulator.hack.dsp.cubic)
.onToggle([&] {
settings.emulator.hack.dsp.cubic = cubicInterpolation.checked();
emulator->configure("Hacks/DSP/Cubic", settings.emulator.hack.dsp.cubic);
});
coprocessorLabel.setText(bms::get("Settings.Enhancements.Coprocessors").data()).setFont(Font().setBold());
coprocessorLabel.setText(bmt::get("Settings.Enhancements.Coprocessors").data()).setFont(Font().setBold());
coprocessorDelayedSyncOption.setText(bms::get("Settings.Enhancements.FastMode").data())
coprocessorDelayedSyncOption.setText(bmt::get("Settings.Enhancements.FastMode").data())
.setChecked(settings.emulator.hack.coprocessor.delayedSync)
.onToggle([&] {
settings.emulator.hack.coprocessor.delayedSync = coprocessorDelayedSyncOption.checked();
});
coprocessorPreferHLEOption.setText(bms::get("Settings.Enhancements.Coprocessors.PreferHle").data())
coprocessorPreferHLEOption.setText(bmt::get("Settings.Enhancements.Coprocessors.PreferHle").data())
.setChecked(settings.emulator.hack.coprocessor.preferHLE)
.setToolTip(bms::get("Settings.Enhancements.Coprocessors.PreferHle.tooltip").data())
.setToolTip(bmt::get("Settings.Enhancements.Coprocessors.PreferHle.tooltip").data())
.onToggle([&] {
settings.emulator.hack.coprocessor.preferHLE = coprocessorPreferHLEOption.checked();
});
coprocessorSpacer.setColor(spacerColor);
gameLabel.setText(bms::get("Settings.Enhancements.GameEnhancements").data()).setFont(Font().setBold());
gameLabel.setText(bmt::get("Settings.Enhancements.GameEnhancements").data()).setFont(Font().setBold());
hotfixes.setText(bms::get("Settings.Enhancements.GameEnhancements.Hotfixes").data())
.setToolTip(bms::get("Settings.Enhancements.GameEnhancements.Hotfixes.tooltip").data())
hotfixes.setText(bmt::get("Settings.Enhancements.GameEnhancements.Hotfixes").data())
.setToolTip(bmt::get("Settings.Enhancements.GameEnhancements.Hotfixes.tooltip").data())
.setChecked(settings.emulator.hack.hotfixes).onToggle([&] {
settings.emulator.hack.hotfixes = hotfixes.checked();
});
note.setText(bms::get("Settings.noteGameRestart").data());
note.setText(bmt::get("Settings.noteGameRestart").data());
}

View file

@ -1,7 +1,7 @@
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
/* /MT. */
auto HotkeySettings::create() -> void {
@ -25,18 +25,18 @@ auto HotkeySettings::create() -> void {
mappingList.resizeColumns();
});
logicLabel.setText({bms::get("Settings.Hotkeys.CombinationalLogic").data(), ':'})
.setToolTip(bms::get("Settings.Hotkeys.CombinationalLogic.tooltip").data());
logicLabel.setText({bmt::get("Settings.Hotkeys.CombinationalLogic").data(), ':'})
.setToolTip(bmt::get("Settings.Hotkeys.CombinationalLogic.tooltip").data());
logicAND.setText(bms::get("Settings.Hotkeys.CombinationalLogic.And").data())
.setToolTip(bms::get("Settings.Hotkeys.CombinationalLogic.And.tooltip").data())
logicAND.setText(bmt::get("Settings.Hotkeys.CombinationalLogic.And").data())
.setToolTip(bmt::get("Settings.Hotkeys.CombinationalLogic.And.tooltip").data())
.onActivate([&] {
settings.input.hotkey.logic = "and";
inputManager.hotkeyLogic = InputMapping::Logic::AND;
});
logicOR.setText(bms::get("Settings.Hotkeys.CombinationalLogic.Or").data())
.setToolTip(bms::get("Settings.Hotkeys.CombinationalLogic.Or.tooltip").data())
logicOR.setText(bmt::get("Settings.Hotkeys.CombinationalLogic.Or").data())
.setToolTip(bmt::get("Settings.Hotkeys.CombinationalLogic.Or.tooltip").data())
.onActivate([&] {
settings.input.hotkey.logic = "or";
inputManager.hotkeyLogic = InputMapping::Logic::OR;
@ -53,12 +53,12 @@ auto HotkeySettings::create() -> void {
inputSink.setFocusable();
assignButton.setText(bms::get("Settings.Common.Assign").data()).onActivate([&] {
assignButton.setText(bmt::get("Settings.Common.Assign").data()).onActivate([&] {
clearButton.doActivate();
assignMapping(mappingList.selected().cell(0));
});
clearButton.setText(bms::get("Common.Clear").data()).onActivate([&] {
clearButton.setText(bmt::get("Common.Clear").data()).onActivate([&] {
cancelMapping();
for (auto mapping : mappingList.batched()) {
@ -75,11 +75,11 @@ auto HotkeySettings::create() -> void {
auto HotkeySettings::reloadMappings() -> void {
mappingList.reset();
mappingList.append(TableViewColumn().setText(bms::get("Common.Name").data()));
mappingList.append(TableViewColumn().setText(bmt::get("Common.Name").data()));
/* MT. */
char space = ' ';
string mappingTextPrefix = {bms::get("Settings.Common.Mapping").data(), space, bms::get("Common.number").data(), space};
string mappingTextPrefix = {bmt::get("Settings.Common.Mapping").data(), space, bmt::get("Common.number").data(), space};
/* /MT. */
for (uint index : range(BindingLimit)) {
@ -88,7 +88,7 @@ auto HotkeySettings::reloadMappings() -> void {
for (auto& hotkey : inputManager.hotkeys) {
TableViewItem item{&mappingList};
item.append(TableViewCell().setText(bms::getHotkeyString(hotkey.name.data()).data()).setFont(Font().setBold()));
item.append(TableViewCell().setText(bmt::getHotkeyString(hotkey.name.data()).data()).setFont(Font().setBold()));
for (uint index : range(BindingLimit)) {
item.append(TableViewCell());
@ -122,8 +122,8 @@ auto HotkeySettings::assignMapping(TableViewCell cell) -> void {
/* MT. */
char space = ' ';
string statusPrefix = {bms::get("Settings.Common.PressKeyOrButtonForMapping").data(), space, bms::get("Common.number").data(), space};
string awaitingString = {"(", bms::get("Settings.Common.AssignLowercase").data(), " ...)"};
string statusPrefix = {bmt::get("Settings.Common.PressKeyOrButtonForMapping").data(), space, bmt::get("Common.number").data(), space};
string awaitingString = {"(", bmt::get("Settings.Common.AssignLowercase").data(), " ...)"};
/* /MT. */
for (auto mapping : mappingList.batched()) {
@ -152,7 +152,7 @@ auto HotkeySettings::inputEvent(shared_pointer<HID::Device> device, uint group,
if (activeMapping->bind(device, group, input, oldValue, newValue, activeBinding)) {
activeMapping.reset();
settingsWindow.statusBar.setText(bms::get("Settings.Common.MappingAssigned").data());
settingsWindow.statusBar.setText(bmt::get("Settings.Common.MappingAssigned").data());
refreshMappings();
timer.onActivate([&] {

View file

@ -1,7 +1,7 @@
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
/* /MT. */
auto InputSettings::create() -> void {
@ -10,17 +10,17 @@ auto InputSettings::create() -> void {
char colon = ':';
inputFocusLabel.setText({bms::get("Settings.Input.WhenFocusIsLost").data(), colon});
inputFocusLabel.setText({bmt::get("Settings.Input.WhenFocusIsLost").data(), colon});
pauseEmulation.setText(bms::get("Settings.Input.WhenFocusIsLost.PauseEmulation").data()).onActivate([&] {
pauseEmulation.setText(bmt::get("Settings.Input.WhenFocusIsLost.PauseEmulation").data()).onActivate([&] {
settings.input.defocus = "Pause";
});
blockInput.setText(bms::get("Settings.Input.WhenFocusIsLost.BlockInput").data()).onActivate([&] {
blockInput.setText(bmt::get("Settings.Input.WhenFocusIsLost.BlockInput").data()).onActivate([&] {
settings.input.defocus = "Block";
});
allowInput.setText(bms::get("Settings.Input.WhenFocusIsLost.AllowInput").data()).onActivate([&] {
allowInput.setText(bmt::get("Settings.Input.WhenFocusIsLost.AllowInput").data()).onActivate([&] {
settings.input.defocus = "Allow";
});
@ -38,20 +38,20 @@ auto InputSettings::create() -> void {
separator.setColor({192, 192, 192});
portLabel.setText({bms::get("Settings.Input.Port").data(), colon});
portLabel.setText({bmt::get("Settings.Input.Port").data(), colon});
portList.onChange([&] {
reloadDevices();
});
deviceLabel.setText({bms::get("Settings.Input.Device").data(), colon});
deviceLabel.setText({bmt::get("Settings.Input.Device").data(), colon});
deviceList.onChange([&] {
reloadMappings();
});
turboLabel.setText({bms::get("Settings.Input.TurboRate").data(), colon})
.setToolTip(bms::get("Settings.Input.TurboRate.tooltip").data());
turboLabel.setText({bmt::get("Settings.Input.TurboRate").data(), colon})
.setToolTip(bmt::get("Settings.Input.TurboRate.tooltip").data());
for (uint frequency : range(1, 9)) {
ComboButtonItem item{&turboList};
@ -98,12 +98,12 @@ auto InputSettings::create() -> void {
assignMouseInput(2);
});
assignButton.setText(bms::get("Settings.Common.Assign").data()).onActivate([&] {
assignButton.setText(bmt::get("Settings.Common.Assign").data()).onActivate([&] {
clearButton.doActivate();
assignMapping(mappingList.selected().cell(0));
});
clearButton.setText(bms::get("Common.Clear").data()).onActivate([&] {
clearButton.setText(bmt::get("Common.Clear").data()).onActivate([&] {
cancelMapping();
for (auto mapping : mappingList.batched()) {
@ -128,13 +128,13 @@ auto InputSettings::updateControls() -> void {
auto& input = activeDevice().mappings[batched.left().offset()];
if (input.isDigital()) {
assignMouse1.setVisible().setText(bms::get("Settings.Input.MouseLeft").data());
assignMouse2.setVisible().setText(bms::get("Settings.Input.MouseMiddle").data());
assignMouse3.setVisible().setText(bms::get("Settings.Input.MouseRight").data());
assignMouse1.setVisible().setText(bmt::get("Settings.Input.MouseLeft").data());
assignMouse2.setVisible().setText(bmt::get("Settings.Input.MouseMiddle").data());
assignMouse3.setVisible().setText(bmt::get("Settings.Input.MouseRight").data());
}
else if (input.isAnalog()) {
assignMouse1.setVisible().setText(bms::get("Settings.Input.MouseXAxis").data());
assignMouse2.setVisible().setText(bms::get("Settings.Input.MouseYAxis").data());
assignMouse1.setVisible().setText(bmt::get("Settings.Input.MouseXAxis").data());
assignMouse2.setVisible().setText(bmt::get("Settings.Input.MouseYAxis").data());
}
}
@ -162,13 +162,13 @@ auto InputSettings::reloadPorts() -> void {
auto portName = port.name;
if (portName == "Controller Port 1") {
portText = {bms::get("Menu.System.ControllerPort").data(), " 1"};
portText = {bmt::get("Menu.System.ControllerPort").data(), " 1"};
}
else if (portName == "Controller Port 2") {
portText = {bms::get("Menu.System.ControllerPort").data(), " 2"};
portText = {bmt::get("Menu.System.ControllerPort").data(), " 2"};
}
else {
portText = bms::getDeviceString(port.name.data()).data();
portText = bmt::getDeviceString(port.name.data()).data();
}
portList.append(ComboButtonItem().setText(portText));
@ -183,7 +183,7 @@ auto InputSettings::reloadDevices() -> void {
for (auto& device : activePort().devices) {
if (device.mappings) { // only display devices that have configurable inputs
auto item = ComboButtonItem().setText(bms::getDeviceString(device.name.data()).data())
auto item = ComboButtonItem().setText(bmt::getDeviceString(device.name.data()).data())
.setAttribute("index", index);
deviceList.append(item);
@ -197,11 +197,11 @@ auto InputSettings::reloadDevices() -> void {
auto InputSettings::reloadMappings() -> void {
mappingList.reset();
mappingList.append(TableViewColumn().setText(bms::get("Common.Name").data()));
mappingList.append(TableViewColumn().setText(bmt::get("Common.Name").data()));
/* MT. */
char space = ' ';
const string mappingTextPrefix = {bms::get("Settings.Common.Mapping").data(), space, bms::get("Common.number").data(), space};
const string mappingTextPrefix = {bmt::get("Settings.Common.Mapping").data(), space, bmt::get("Common.number").data(), space};
/* /MT. */
for (uint n : range(BindingLimit)) {
@ -254,8 +254,8 @@ auto InputSettings::assignMapping(TableViewCell cell) -> void {
/* MT. */
char space = ' ';
string statusPrefix = {bms::get("Settings.Common.PressKeyOrButtonForMapping").data(), space, bms::get("Common.number").data(), space};
string awaitingString = {"(", bms::get("Settings.Common.AssignLowercase").data(), " ...)"};
string statusPrefix = {bmt::get("Settings.Common.PressKeyOrButtonForMapping").data(), space, bmt::get("Common.number").data(), space};
string awaitingString = {"(", bmt::get("Settings.Common.AssignLowercase").data(), " ...)"};
/* /MT. */
for (auto mapping : mappingList.batched()) {
@ -303,7 +303,7 @@ auto InputSettings::inputEvent(shared_pointer<HID::Device> device, uint group, u
if (activeMapping->bind(device, group, input, oldValue, newValue, activeBinding)) {
activeMapping.reset();
settingsWindow.statusBar.setText(bms::get("Settings.Common.MappingAssigned").data());
settingsWindow.statusBar.setText(bmt::get("Settings.Common.MappingAssigned").data());
refreshMappings();
timer.onActivate([&] {

View file

@ -1,7 +1,7 @@
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
/* /MT. */
auto PathSettings::create() -> void {
@ -16,92 +16,92 @@ auto PathSettings::create() -> void {
auto ellipsis = "...";
/* /MT. */
gamesLabel.setText({bms::get("Settings.Paths.Games").data(), colon});
gamesLabel.setText({bmt::get("Settings.Paths.Games").data(), colon});
gamesPath.setEditable(false);
gamesAssign.setText({bms::get("Settings.Common.Assign").data(), ellipsis}).onActivate([&] {
gamesAssign.setText({bmt::get("Settings.Common.Assign").data(), ellipsis}).onActivate([&] {
if (auto location = program.selectPath()) {
settings.path.games = location;
refreshPaths();
}
});
gamesReset.setText(bms::get("Common.Reset").data()).onActivate([&] {
gamesReset.setText(bmt::get("Common.Reset").data()).onActivate([&] {
settings.path.games = "";
refreshPaths();
});
patchesLabel.setText({bms::get("Settings.Paths.Patches").data(), colon});
patchesLabel.setText({bmt::get("Settings.Paths.Patches").data(), colon});
patchesPath.setEditable(false);
patchesAssign.setText({bms::get("Settings.Common.Assign").data(), ellipsis}).onActivate([&] {
patchesAssign.setText({bmt::get("Settings.Common.Assign").data(), ellipsis}).onActivate([&] {
if (auto location = program.selectPath()) {
settings.path.patches = location;
refreshPaths();
}
});
patchesReset.setText(bms::get("Common.Reset").data()).onActivate([&] {
patchesReset.setText(bmt::get("Common.Reset").data()).onActivate([&] {
settings.path.patches = "";
refreshPaths();
});
savesLabel.setText({bms::get("Settings.Paths.Saves").data(), colon});
savesLabel.setText({bmt::get("Settings.Paths.Saves").data(), colon});
savesPath.setEditable(false);
savesAssign.setText({bms::get("Settings.Common.Assign").data(), ellipsis}).onActivate([&] {
savesAssign.setText({bmt::get("Settings.Common.Assign").data(), ellipsis}).onActivate([&] {
if (auto location = program.selectPath()) {
settings.path.saves = location;
refreshPaths();
}
});
savesReset.setText(bms::get("Common.Reset").data()).onActivate([&] {
savesReset.setText(bmt::get("Common.Reset").data()).onActivate([&] {
settings.path.saves = "";
refreshPaths();
});
cheatsLabel.setText({bms::get("Settings.Paths.Cheats").data(), colon});
cheatsLabel.setText({bmt::get("Settings.Paths.Cheats").data(), colon});
cheatsPath.setEditable(false);
cheatsAssign.setText({bms::get("Settings.Common.Assign").data(), ellipsis}).onActivate([&] {
cheatsAssign.setText({bmt::get("Settings.Common.Assign").data(), ellipsis}).onActivate([&] {
if (auto location = program.selectPath()) {
settings.path.cheats = location;
refreshPaths();
}
});
cheatsReset.setText(bms::get("Common.Reset").data()).onActivate([&] {
cheatsReset.setText(bmt::get("Common.Reset").data()).onActivate([&] {
settings.path.cheats = "";
refreshPaths();
});
statesLabel.setText({bms::get("Settings.Paths.States").data(), colon});
statesLabel.setText({bmt::get("Settings.Paths.States").data(), colon});
statesPath.setEditable(false);
statesAssign.setText({bms::get("Settings.Common.Assign").data(), ellipsis}).onActivate([&] {
statesAssign.setText({bmt::get("Settings.Common.Assign").data(), ellipsis}).onActivate([&] {
if (auto location = program.selectPath()) {
settings.path.states = location;
refreshPaths();
}
});
statesReset.setText(bms::get("Common.Reset").data()).onActivate([&] {
statesReset.setText(bmt::get("Common.Reset").data()).onActivate([&] {
settings.path.states = "";
refreshPaths();
});
screenshotsLabel.setText({bms::get("Settings.Paths.Screenshots").data(), colon});
screenshotsLabel.setText({bmt::get("Settings.Paths.Screenshots").data(), colon});
screenshotsPath.setEditable(false);
screenshotsAssign.setText({bms::get("Settings.Common.Assign").data(), ellipsis}).onActivate([&] {
screenshotsAssign.setText({bmt::get("Settings.Common.Assign").data(), ellipsis}).onActivate([&] {
if (auto location = program.selectPath()) {
settings.path.screenshots = location;
refreshPaths();
}
});
screenshotsReset.setText(bms::get("Common.Reset").data()).onActivate([&] {
screenshotsReset.setText(bmt::get("Common.Reset").data()).onActivate([&] {
settings.path.screenshots = "";
refreshPaths();
});
@ -116,41 +116,41 @@ auto PathSettings::refreshPaths() -> void {
gamesPath.setText(location).setForegroundColor();
}
else {
gamesPath.setText({"(", bms::get("Settings.Paths.LastRecentlyUsed").data(), ")"}).setForegroundColor(textColor);
gamesPath.setText({"(", bmt::get("Settings.Paths.LastRecentlyUsed").data(), ")"}).setForegroundColor(textColor);
}
if (auto location = settings.path.patches) {
patchesPath.setText(location).setForegroundColor();
}
else {
patchesPath.setText({"(", bms::get("Settings.Paths.SameAsLoadedGame").data(), ")"}).setForegroundColor(textColor);
patchesPath.setText({"(", bmt::get("Settings.Paths.SameAsLoadedGame").data(), ")"}).setForegroundColor(textColor);
}
if (auto location = settings.path.saves) {
savesPath.setText(location).setForegroundColor();
}
else {
savesPath.setText({"(", bms::get("Settings.Paths.SameAsLoadedGame").data(), ")"}).setForegroundColor(textColor);
savesPath.setText({"(", bmt::get("Settings.Paths.SameAsLoadedGame").data(), ")"}).setForegroundColor(textColor);
}
if (auto location = settings.path.cheats) {
cheatsPath.setText(location).setForegroundColor();
}
else {
cheatsPath.setText({"(", bms::get("Settings.Paths.SameAsLoadedGame").data(), ")"}).setForegroundColor(textColor);
cheatsPath.setText({"(", bmt::get("Settings.Paths.SameAsLoadedGame").data(), ")"}).setForegroundColor(textColor);
}
if (auto location = settings.path.states) {
statesPath.setText(location).setForegroundColor();
}
else {
statesPath.setText({"(", bms::get("Settings.Paths.SameAsLoadedGame").data(), ")"}).setForegroundColor(textColor);
statesPath.setText({"(", bmt::get("Settings.Paths.SameAsLoadedGame").data(), ")"}).setForegroundColor(textColor);
}
if (auto location = settings.path.screenshots) {
screenshotsPath.setText(location).setForegroundColor();
}
else {
screenshotsPath.setText({"(", bms::get("Settings.Paths.SameAsLoadedGame").data(), ")"}).setForegroundColor(textColor);
screenshotsPath.setText({"(", bmt::get("Settings.Paths.SameAsLoadedGame").data(), ")"}).setForegroundColor(textColor);
}
}

View file

@ -1,7 +1,7 @@
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
/* /MT. */
auto VideoSettings::create() -> void {
@ -10,12 +10,12 @@ auto VideoSettings::create() -> void {
char colon = ':';
colorAdjustmentLabel.setFont(Font().setBold()).setText(bms::get("Settings.Video.ColorAdjustment").data());
colorAdjustmentLabel.setFont(Font().setBold()).setText(bmt::get("Settings.Video.ColorAdjustment").data());
colorLayout.setSize({3, 3});
colorLayout.column(0).setAlignment(1.0);
luminanceLabel.setText({bms::get("Settings.Video.Luminance").data(), colon});
luminanceLabel.setText({bmt::get("Settings.Video.Luminance").data(), colon});
luminanceValue.setAlignment(0.5);
luminanceSlider.setLength(101).setPosition(settings.video.luminance)
@ -27,7 +27,7 @@ auto VideoSettings::create() -> void {
})
.doChange();
saturationLabel.setText({bms::get("Settings.Video.Saturation").data(), colon});
saturationLabel.setText({bmt::get("Settings.Video.Saturation").data(), colon});
saturationValue.setAlignment(0.5);
saturationSlider.setLength(201).setPosition(settings.video.saturation)
@ -39,7 +39,7 @@ auto VideoSettings::create() -> void {
})
.doChange();
gammaLabel.setText({bms::get("Settings.Video.Gamma").data(), colon});
gammaLabel.setText({bmt::get("Settings.Video.Gamma").data(), colon});
gammaValue.setAlignment(0.5);
gammaSlider.setLength(101).setPosition(settings.video.gamma - 100)
@ -51,14 +51,14 @@ auto VideoSettings::create() -> void {
})
.doChange();
dimmingOption.setText(bms::get("Settings.Video.DimVideoWhenIdle").data())
.setToolTip(bms::get("Settings.Video.DimVideoWhenIdle.tooltip").data())
dimmingOption.setText(bmt::get("Settings.Video.DimVideoWhenIdle").data())
.setToolTip(bmt::get("Settings.Video.DimVideoWhenIdle.tooltip").data())
.setChecked(settings.video.dimming)
.onToggle([&] {
settings.video.dimming = dimmingOption.checked();
});
snowOption.setText(bms::get("Settings.Video.DrawSnowEffectWhenIdle").data())
snowOption.setText(bmt::get("Settings.Video.DrawSnowEffectWhenIdle").data())
.setChecked(settings.video.snow)
.onToggle([&] {
settings.video.snow = snowOption.checked();

View file

@ -11,9 +11,9 @@
#include "_drivers.cpp"
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
/* /MT. */
Settings settings;
@ -186,15 +186,15 @@ public:
auto SettingsWindow::create() -> void {
layout.setPadding(5_sx);
panelList.append(ListViewItem().setText(bms::get("Common.Video").data()).setIcon(Icon::Device::Display));
panelList.append(ListViewItem().setText(bms::get("Common.Audio").data()).setIcon(Icon::Device::Speaker));
panelList.append(ListViewItem().setText(bms::get("Settings.Input").data()).setIcon(Icon::Device::Joypad));
panelList.append(ListViewItem().setText(bms::get("Settings.Hotkeys").data()).setIcon(Icon::Device::Keyboard));
panelList.append(ListViewItem().setText(bms::get("Settings.Paths").data()).setIcon(Icon::Emblem::Folder));
panelList.append(ListViewItem().setText(bms::get("Settings.Emulator").data()).setIcon(Icon::Action::Settings));
panelList.append(ListViewItem().setText(bms::get("Settings.Enhancements").data()).setIcon(Icon::Action::Add));
panelList.append(ListViewItem().setText(bms::get("Settings.Compatibility").data()).setIcon(Icon::Action::Remove));
panelList.append(ListViewItem().setText(bms::get("Settings.Drivers").data()).setIcon(Icon::Place::Settings));
panelList.append(ListViewItem().setText(bmt::get("Common.Video").data()).setIcon(Icon::Device::Display));
panelList.append(ListViewItem().setText(bmt::get("Common.Audio").data()).setIcon(Icon::Device::Speaker));
panelList.append(ListViewItem().setText(bmt::get("Settings.Input").data()).setIcon(Icon::Device::Joypad));
panelList.append(ListViewItem().setText(bmt::get("Settings.Hotkeys").data()).setIcon(Icon::Device::Keyboard));
panelList.append(ListViewItem().setText(bmt::get("Settings.Paths").data()).setIcon(Icon::Emblem::Folder));
panelList.append(ListViewItem().setText(bmt::get("Settings.Emulator").data()).setIcon(Icon::Action::Settings));
panelList.append(ListViewItem().setText(bmt::get("Settings.Enhancements").data()).setIcon(Icon::Action::Add));
panelList.append(ListViewItem().setText(bmt::get("Settings.Compatibility").data()).setIcon(Icon::Action::Remove));
panelList.append(ListViewItem().setText(bmt::get("Settings.Drivers").data()).setIcon(Icon::Place::Settings));
panelList.onChange([&] {
if (auto item = panelList.selected()) {
@ -217,7 +217,7 @@ auto SettingsWindow::create() -> void {
panelContainer.append(driverSettings, Size{~0, ~0});
statusBar.setFont(Font().setBold());
setTitle(bms::get("Settings").data());
setTitle(bmt::get("Settings").data());
setSize({680_sx, 400_sy});
setAlignment({0.0, 1.0});
setDismissable();

View file

@ -1,19 +1,19 @@
auto CheatDatabase::create() -> void {
layout.setPadding(5_sx);
selectAllButton.setText(bms::get("Tools.CheatEditor.SelectAll").data()).onActivate([&] {
selectAllButton.setText(bmt::get("Tools.CheatEditor.SelectAll").data()).onActivate([&] {
for (auto item : cheatList.items()) {
item.setChecked(true);
}
});
unselectAllButton.setText(bms::get("Tools.CheatEditor.UnselectAll").data()).onActivate([&] {
unselectAllButton.setText(bmt::get("Tools.CheatEditor.UnselectAll").data()).onActivate([&] {
for (auto item : cheatList.items()) {
item.setChecked(false);
}
});
addCheatsButton.setText(bms::get("Tools.CheatEditor.AddCheats").data()).onActivate([&] {
addCheatsButton.setText(bmt::get("Tools.CheatEditor.AddCheats").data()).onActivate([&] {
addCheats();
});
@ -64,11 +64,11 @@ auto CheatDatabase::findCheats() -> void {
}
/* // Commented-out by MT.
MessageDialog().setAlignment(*toolsWindow).setText(bms::get("Tools.CheatEditor.noCheats").data()).information();
MessageDialog().setAlignment(*toolsWindow).setText(bmt::get("Tools.CheatEditor.noCheats").data()).information();
*/
bmw::showInfo(
bms::get("Tools.CheatEditor.noCheats"),
bmt::get("Tools.CheatEditor.noCheats"),
"",
toolsWindow->handle()
); // MT.
@ -91,7 +91,7 @@ auto CheatWindow::create() -> void {
tableLayout.setSize({2, 2});
tableLayout.cell(0).setAlignment({1.0, 0.5});
tableLayout.cell(2).setAlignment({1.0, 0.0});
nameLabel.setText({bms::get("Common.Name").data(), ':'});
nameLabel.setText({bmt::get("Common.Name").data(), ':'});
nameValue.onActivate([&] {
if (acceptButton.enabled()) {
@ -103,20 +103,20 @@ auto CheatWindow::create() -> void {
doChange();
});
codeLabel.setText({bms::get("Tools.CheatEditor.Codes").data(), ':'});
codeLabel.setText({bmt::get("Tools.CheatEditor.Codes").data(), ':'});
codeValue.setFont(Font().setFamily(Font::Mono));
codeValue.onChange([&] {
doChange();
});
enableOption.setText(bms::get("Tools.CheatEditor.Enable").data());
enableOption.setText(bmt::get("Tools.CheatEditor.Enable").data());
acceptButton.onActivate([&] {
doAccept();
});
cancelButton.setText(bms::get("Common.Cancel").data()).onActivate([&] {
cancelButton.setText(bmt::get("Common.Cancel").data()).onActivate([&] {
setVisible(false);
});
@ -129,12 +129,12 @@ auto CheatWindow::show(Cheat cheat) -> void {
codeValue.setText(cheat.code.split("+").strip().merge("\n"));
enableOption.setChecked(cheat.enable);
doChange();
setTitle(!cheat.name ? bms::get("Tools.CheatEditor.AddCheat").data() : bms::get("Tools.CheatEditor.EditCheat").data());
setTitle(!cheat.name ? bmt::get("Tools.CheatEditor.AddCheat").data() : bmt::get("Tools.CheatEditor.EditCheat").data());
setAlignment(*toolsWindow);
setVisible();
setFocused();
nameValue.setFocused();
acceptButton.setText(!cheat.name ? bms::get("Common.Add").data() : bms::get("Tools.CheatEditor.Edit").data());
acceptButton.setText(!cheat.name ? bmt::get("Common.Add").data() : bmt::get("Tools.CheatEditor.Edit").data());
}
auto CheatWindow::doChange() -> void {
@ -152,7 +152,7 @@ auto CheatWindow::doAccept() -> void {
if (!program.gameBoy.program) {
if (!cheatEditor.decodeSNES(code)) {
invalid = {
bms::get("Tools.CheatEditor.invalidFormat").data(),
bmt::get("Tools.CheatEditor.invalidFormat").data(),
":\n\n"
"Game Genie (eeee-eeee)\n"
"Pro Action Replay (aaaaaadd)\n"
@ -163,7 +163,7 @@ auto CheatWindow::doAccept() -> void {
}
else if (!cheatEditor.decodeGB(code)) {
invalid = {
bms::get("Tools.CheatEditor.invalidFormat").data(),
bmt::get("Tools.CheatEditor.invalidFormat").data(),
":\n\n"
"Game Genie (eee-eee)\n"
"Game Genie (eee-eee-eee)\n"
@ -187,7 +187,7 @@ auto CheatWindow::doAccept() -> void {
Cheat cheat = {nameValue.text().strip(), codes.merge("+"), enableOption.checked()};
if (acceptButton.text() == bms::get("Common.Add").data()) {
if (acceptButton.text() == bmt::get("Common.Add").data()) {
cheatEditor.addCheat(cheat);
}
else {
@ -241,39 +241,39 @@ auto CheatEditor::create() -> void {
cheatList.resizeColumns();
});
findCheatsButton.setText({bms::get("Tools.CheatEditor.FindCheats").data(), "..."}).onActivate([&] {
findCheatsButton.setText({bmt::get("Tools.CheatEditor.FindCheats").data(), "..."}).onActivate([&] {
cheatDatabase.findCheats();
});
enableCheats.setText(bms::get("Tools.CheatEditor.EnableCheats").data())
.setToolTip(bms::get("Tools.CheatEditor.EnableCheats.tooltip").data())
enableCheats.setText(bmt::get("Tools.CheatEditor.EnableCheats").data())
.setToolTip(bmt::get("Tools.CheatEditor.EnableCheats.tooltip").data())
.setChecked(settings.emulator.cheats.enable)
.onToggle([&] {
settings.emulator.cheats.enable = enableCheats.checked();
string message; // MT.
if (enableCheats.checked()) {
message = bms::get("Tools.CheatEditor.EnableCheats.enabled").data();
message = bmt::get("Tools.CheatEditor.EnableCheats.enabled").data();
}
else {
message = bms::get("Tools.CheatEditor.EnableCheats.disabled").data();
message = bmt::get("Tools.CheatEditor.EnableCheats.disabled").data();
}
program.showMessage(message); // MT.
synchronizeCodes();
});
addButton.setText(bms::get("Common.Add").data()).onActivate([&] {
addButton.setText(bmt::get("Common.Add").data()).onActivate([&] {
cheatWindow.show();
});
editButton.setText(bms::get("Tools.CheatEditor.Edit").data()).onActivate([&] {
editButton.setText(bmt::get("Tools.CheatEditor.Edit").data()).onActivate([&] {
if (auto item = cheatList.selected()) {
cheatWindow.show(cheats[item.offset()]);
}
});
removeButton.setText(bms::get("Common.Remove").data()).onActivate([&] {
removeButton.setText(bmt::get("Common.Remove").data()).onActivate([&] {
removeCheats();
});
@ -286,7 +286,7 @@ auto CheatEditor::create() -> void {
auto CheatEditor::refresh() -> void {
cheatList.reset();
cheatList.append(TableViewColumn());
cheatList.append(TableViewColumn().setText(bms::get("Common.Name").data()).setSorting(Sort::Ascending).setExpandable());
cheatList.append(TableViewColumn().setText(bmt::get("Common.Name").data()).setSorting(Sort::Ascending).setExpandable());
for (auto& cheat : cheats) {
TableViewItem item{&cheatList};
@ -334,8 +334,8 @@ auto CheatEditor::editCheat(Cheat cheat) -> void {
auto CheatEditor::removeCheats() -> void {
if (auto batched = cheatList.batched()) {
/* // Commented-out by MT.
if (MessageDialog(bms::get("Tools.CheatEditor.remove.confirm").data())
.setAlignment(*toolsWindow).question({bms::get("Common.Yes").data(), bms::get("Common.No").data()}) == bms::get("Common.Yes").data()) {
if (MessageDialog(bmt::get("Tools.CheatEditor.remove.confirm").data())
.setAlignment(*toolsWindow).question({bmt::get("Common.Yes").data(), bmt::get("Common.No").data()}) == bmt::get("Common.Yes").data()) {
*/
if (bmw::confirmById("Tools.CheatEditor.remove.confirm", toolsWindow->handle())) { // MT.

View file

@ -39,7 +39,7 @@ auto CheatFinder::create() -> void {
eventScan();
});
searchLabel.setText({bms::get("Tools.CheatFinder.Value").data(), ':'});
searchLabel.setText({bmt::get("Tools.CheatFinder.Value").data(), ':'});
searchSize.append(ComboButtonItem().setText("Byte"));
searchSize.append(ComboButtonItem().setText("Word"));
@ -53,13 +53,13 @@ auto CheatFinder::create() -> void {
searchMode.append(ComboButtonItem().setText("<"));
searchSpan.append(ComboButtonItem().setText("WRAM"));
searchSpan.append(ComboButtonItem().setText(bms::get("Tools.CheatFinder.All").data()));
searchSpan.append(ComboButtonItem().setText(bmt::get("Tools.CheatFinder.All").data()));
searchScan.setText(bms::get("Tools.CheatFinder.Scan").data()).onActivate([&] {
searchScan.setText(bmt::get("Tools.CheatFinder.Scan").data()).onActivate([&] {
eventScan();
});
searchClear.setText(bms::get("Common.Clear").data()).onActivate([&] {
searchClear.setText(bmt::get("Common.Clear").data()).onActivate([&] {
eventClear();
});
@ -77,8 +77,8 @@ auto CheatFinder::restart() -> void {
auto CheatFinder::refresh() -> void {
searchList.reset();
searchList.append(TableViewColumn().setText(bms::get("Tools.CheatFinder.Address").data()));
searchList.append(TableViewColumn().setText(bms::get("Tools.CheatFinder.Value").data()));
searchList.append(TableViewColumn().setText(bmt::get("Tools.CheatFinder.Address").data()));
searchList.append(TableViewColumn().setText(bmt::get("Tools.CheatFinder.Value").data()));
for (auto& candidate : candidates) {
TableViewItem item{&searchList};

View file

@ -2,7 +2,7 @@ auto ManifestViewer::create() -> void {
setCollapsible();
setVisible(false);
manifestLabel.setText({bms::get("Tools.ManifestViewer.Manifest").data(), ':'});
manifestLabel.setText({bmt::get("Tools.ManifestViewer.Manifest").data(), ':'});
manifestOption.onChange([&] {
selectManifest();

View file

@ -2,7 +2,7 @@
auto StateWindow::create() -> void {
layout.setPadding(5_sx);
nameLabel.setText({bms::get("Common.Name").data(), ':'});
nameLabel.setText({bmt::get("Common.Name").data(), ':'});
nameValue.onActivate([&] {
if (acceptButton.enabled()) {
@ -18,7 +18,7 @@ auto StateWindow::create() -> void {
doAccept();
});
cancelButton.setText(bms::get("Common.Cancel").data()).onActivate([&] {
cancelButton.setText(bmt::get("Common.Cancel").data()).onActivate([&] {
setVisible(false);
});
@ -31,12 +31,12 @@ auto StateWindow::show(string name) -> void {
setAttribute("name", {name.split("/").last()});
nameValue.setText(attribute("name"));
doChange();
setTitle(!attribute("name") ? bms::get("Tools.StateManager.AddState").data() : bms::get("Tools.StateManager.RenameState").data());
setTitle(!attribute("name") ? bmt::get("Tools.StateManager.AddState").data() : bmt::get("Tools.StateManager.RenameState").data());
setAlignment(*toolsWindow);
setVisible();
setFocused();
nameValue.setFocused();
acceptButton.setText(!attribute("name") ? bms::get("Common.Add").data() : bms::get("Common.Rename").data());
acceptButton.setText(!attribute("name") ? bmt::get("Common.Add").data() : bmt::get("Common.Rename").data());
}
auto StateWindow::doChange() -> void {
@ -57,7 +57,7 @@ auto StateWindow::doChange() -> void {
auto StateWindow::doAccept() -> void {
string name = {attribute("type"), nameValue.text().strip()};
if (acceptButton.text() == bms::get("Common.Add").data()) {
if (acceptButton.text() == bmt::get("Common.Add").data()) {
stateManager.createState(name);
}
else {
@ -93,12 +93,12 @@ auto StateManager::create() -> void {
stateList.resizeColumns();
});
categoryLabel.setText({bms::get("Tools.StateManager.Category").data(), ':'});
categoryLabel.setText({bmt::get("Tools.StateManager.Category").data(), ':'});
auto managedItem = ComboButtonItem().setText(bms::get("Tools.StateManager.Category.ManagedStates").data())
auto managedItem = ComboButtonItem().setText(bmt::get("Tools.StateManager.Category.ManagedStates").data())
.setAttribute("type", "Managed/");
auto quickItem = ComboButtonItem().setText(bms::get("Tools.StateManager.Category.QuickStates").data())
auto quickItem = ComboButtonItem().setText(bmt::get("Tools.StateManager.Category.QuickStates").data())
.setAttribute("type", "Quick/");
categoryOption.append(managedItem);
@ -111,32 +111,32 @@ auto StateManager::create() -> void {
Color separatorColor = {192, 192, 192}; // MT.
statePreviewSeparator1.setColor(separatorColor);
statePreviewLabel.setFont(Font().setBold()).setText(bms::get("Tools.StateManager.Preview").data());
statePreviewLabel.setFont(Font().setBold()).setText(bmt::get("Tools.StateManager.Preview").data());
statePreviewSeparator2.setColor(separatorColor);
loadButton.setText(bms::get("Common.Load").data()).onActivate([&] {
loadButton.setText(bmt::get("Common.Load").data()).onActivate([&] {
if (auto item = stateList.selected()) {
program.loadState(item.attribute("name"));
}
});
saveButton.setText(bms::get("Common.Save").data()).onActivate([&] {
saveButton.setText(bmt::get("Common.Save").data()).onActivate([&] {
if (auto item = stateList.selected()) {
program.saveState(item.attribute("name"));
}
});
addButton.setText(bms::get("Common.Add").data()).onActivate([&] {
addButton.setText(bmt::get("Common.Add").data()).onActivate([&] {
stateWindow.show(type());
});
editButton.setText(bms::get("Common.Rename").data()).onActivate([&] {
editButton.setText(bmt::get("Common.Rename").data()).onActivate([&] {
if (auto item = stateList.selected()) {
stateWindow.show(item.attribute("name"));
}
});
removeButton.setText(bms::get("Common.Remove").data()).onActivate([&] {
removeButton.setText(bmt::get("Common.Remove").data()).onActivate([&] {
removeStates();
});
}
@ -147,15 +147,15 @@ auto StateManager::type() const -> string {
auto StateManager::loadStates() -> void {
stateList.reset();
stateList.append(TableViewColumn().setText(bms::get("Common.Name").data()).setSorting(Sort::Ascending).setExpandable());
stateList.append(TableViewColumn().setText(bms::get("Common.Date").data()).setForegroundColor({160, 160, 160}));
stateList.append(TableViewColumn().setText(bmt::get("Common.Name").data()).setSorting(Sort::Ascending).setExpandable());
stateList.append(TableViewColumn().setText(bmt::get("Common.Date").data()).setForegroundColor({160, 160, 160}));
auto type = this->type();
/* MT. */
string redoTranslated = bms::get("Tools.StateManager.QuickStates.Redo").data();
string undoTranslated = bms::get("Tools.StateManager.QuickStates.Undo").data();
string slotTranslated = bms::get("Tools.SaveState.Slot").data();
string redoTranslated = bmt::get("Tools.StateManager.QuickStates.Redo").data();
string undoTranslated = bmt::get("Tools.StateManager.QuickStates.Undo").data();
string slotTranslated = bmt::get("Tools.SaveState.Slot").data();
/* /MT. */
for (auto& state : program.availableStates(type)) {
@ -213,8 +213,8 @@ auto StateManager::modifyState(string name) -> void {
auto StateManager::removeStates() -> void {
if (auto batched = stateList.batched()) {
/* // Commented-out by MT.
if (MessageDialog(bms::get("Tools.StateManager.remove.confirm").data())
.setAlignment(*toolsWindow).question({bms::get("Common.Yes").data(), bms::get("Common.No").data()}) == bms::get("Common.Yes").data()) {
if (MessageDialog(bmt::get("Tools.StateManager.remove.confirm").data())
.setAlignment(*toolsWindow).question({bmt::get("Common.Yes").data(), bmt::get("Common.No").data()}) == bmt::get("Common.Yes").data()) {
*/
if (bmw::confirmById("Tools.StateManager.remove.confirm"), toolsWindow->handle()) { // MT.

View file

@ -1,8 +1,8 @@
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
#include "bsnes-mt/messagebox.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
namespace bmw = bsnesMt::windows;
/* /MT. */
@ -61,10 +61,10 @@ public:
auto ToolsWindow::create() -> void {
layout.setPadding(5_sx);
panelList.append(ListViewItem().setText(bms::get("Tools.CheatFinder").data()).setIcon(Icon::Action::Search));
panelList.append(ListViewItem().setText(bms::get("Tools.CheatEditor").data()).setIcon(Icon::Edit::Replace));
panelList.append(ListViewItem().setText(bms::get("Tools.StateManager").data()).setIcon(Icon::Application::FileManager));
panelList.append(ListViewItem().setText(bms::get("Tools.ManifestViewer").data()).setIcon(Icon::Emblem::Text));
panelList.append(ListViewItem().setText(bmt::get("Tools.CheatFinder").data()).setIcon(Icon::Action::Search));
panelList.append(ListViewItem().setText(bmt::get("Tools.CheatEditor").data()).setIcon(Icon::Edit::Replace));
panelList.append(ListViewItem().setText(bmt::get("Tools.StateManager").data()).setIcon(Icon::Application::FileManager));
panelList.append(ListViewItem().setText(bmt::get("Tools.ManifestViewer").data()).setIcon(Icon::Emblem::Text));
panelList.onChange([&] {
if (auto item = panelList.selected()) {
@ -81,7 +81,7 @@ auto ToolsWindow::create() -> void {
panelContainer.append(stateManager, Size{~0, ~0});
panelContainer.append(manifestViewer, Size{~0, ~0});
setTitle(bms::get("Tools").data()); //"Tools"
setTitle(bmt::get("Tools").data()); //"Tools"
setSize({720_sx, 400_sy});
setAlignment({1.0, 1.0});
setDismissable();

View file

@ -1,10 +1,10 @@
#include "extension.hpp"
/* MT. */
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
#include "bsnes-mt/messagebox.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
namespace bmw = bsnesMt::windows;
/* /MT. */

View file

@ -89,7 +89,7 @@ auto AboutDialog::show() -> void {
versionLabel.setAlignment(1.0);
versionLabel.setFont(Font().setBold());
versionLabel.setForegroundColor({0, 0, 0});
versionLabel.setText({bms::get("About.Version").data(), colon}); // "Version:"
versionLabel.setText({bmt::get("About.Version").data(), colon}); // "Version:"
Label versionValue{&versionLayout, Size{~0, 0}};
versionValue.setAlignment(0.0);
versionValue.setFont(Font().setBold());
@ -103,7 +103,7 @@ auto AboutDialog::show() -> void {
copyrightLabel.setAlignment(1.0);
copyrightLabel.setFont(Font().setBold());
copyrightLabel.setForegroundColor({0, 0, 0});
copyrightLabel.setText({bms::get("About.Copyright").data(), colon}); // "Copyright:"
copyrightLabel.setText({bmt::get("About.Copyright").data(), colon}); // "Copyright:"
Label copyrightValue{&copyrightLayout, Size{~0, 0}};
copyrightValue.setAlignment(0.0);
copyrightValue.setFont(Font().setBold());
@ -117,7 +117,7 @@ auto AboutDialog::show() -> void {
licenseLabel.setAlignment(1.0);
licenseLabel.setFont(Font().setBold());
licenseLabel.setForegroundColor({0, 0, 0});
licenseLabel.setText({bms::get("About.License").data(), colon}); // "License:"
licenseLabel.setText({bmt::get("About.License").data(), colon}); // "License:"
Label licenseValue{&licenseLayout, Size{~0, 0}};
licenseValue.setAlignment(0.0);
licenseValue.setFont(Font().setBold());
@ -131,7 +131,7 @@ auto AboutDialog::show() -> void {
websiteLabel.setAlignment(1.0);
websiteLabel.setFont(Font().setBold());
websiteLabel.setForegroundColor({0, 0, 0});
websiteLabel.setText({bms::get("About.Website").data(), colon}); // "Website:"
websiteLabel.setText({bmt::get("About.Website").data(), colon}); // "Website:"
//add a layout for the website value to fill 50% of the window,
HorizontalLayout websiteValueLayout{&websiteLayout, Size{~0, 0}};
//so that the label is only as long as its text content,
@ -151,7 +151,7 @@ auto AboutDialog::show() -> void {
});
if(!state.website) websiteLayout.setVisible(false);
window.setTitle(string(bms::get("Menu.Help.About").data()).replace('|', state.name ? state.name : Application::name())); // "About "
window.setTitle(string(bmt::get("Menu.Help.About").data()).replace('|', state.name ? state.name : Application::name())); // "About "
window.setBackgroundColor({255, 255, 240});
window.setSize({max(320_sx, layout.minimumSize().width()), layout.minimumSize().height()});
window.setResizable(false);

View file

@ -86,8 +86,8 @@ auto BrowserDialogWindow::accept() -> void {
if(!name || isFolder(name)) return;
if(file::exists({state.path, name})) {
/* // Commented-out by MT.
if(MessageDialog(bms::get("Browser.SaveFile.fileExists").data()).question({bms::get("Common.Yes").data(),
bms::get("Common.No").data()}) != bms::get("Common.Yes").data())
if(MessageDialog(bmt::get("Browser.SaveFile.fileExists").data()).question({bmt::get("Common.Yes").data(),
bmt::get("Common.No").data()}) != bmt::get("Common.Yes").data())
*/
if (!bmw::confirmById("Browser.SaveFile.fileExists"), window.handle()) { // MT.
return;
@ -257,10 +257,10 @@ auto BrowserDialogWindow::run() -> BrowserDialog::Response {
if(state.action == "saveFile") acceptButton.setEnabled(name && !isFolder(name));
});
acceptButton.setEnabled(false).onActivate([&] { accept(); });
if(state.action.beginsWith("open")) acceptButton.setText(bms::get("Common.Open").data()); // tr("Open")
if(state.action.beginsWith("save")) acceptButton.setText(bms::get("Common.Save").data()); // tr("Save")
if(state.action.beginsWith("select")) acceptButton.setText(bms::get("Browser.Select").data()); // tr("Select")
cancelButton.setText(bms::get("Common.Cancel").data()).onActivate([&] { window.setModal(false); }); // tr("Cancel")
if(state.action.beginsWith("open")) acceptButton.setText(bmt::get("Common.Open").data()); // tr("Open")
if(state.action.beginsWith("save")) acceptButton.setText(bmt::get("Common.Save").data()); // tr("Save")
if(state.action.beginsWith("select")) acceptButton.setText(bmt::get("Browser.Select").data()); // tr("Select")
cancelButton.setText(bmt::get("Common.Cancel").data()).onActivate([&] { window.setModal(false); }); // tr("Cancel")
if(!state.filters) state.filters.append("All|*");
for(auto& filter : state.filters) {
@ -274,10 +274,10 @@ auto BrowserDialogWindow::run() -> BrowserDialog::Response {
string ellipsis = "...";
/* /MT. */
createAction.setIcon(Icon::Action::NewFolder).setText({bms::get("Browser.CreateFolder").data(), ellipsis}).onActivate([&] { // "Create Folder..."
createAction.setIcon(Icon::Action::NewFolder).setText({bmt::get("Browser.CreateFolder").data(), ellipsis}).onActivate([&] { // "Create Folder..."
if(auto name = NameDialog()
.setTitle(bms::get("Browser.CreateFolder").data()) // "Create Folder"
.setText({bms::get("Browser.CreateFolder.EnterNewFolderName").data(), colon}) // "Enter a new folder name:"
.setTitle(bmt::get("Browser.CreateFolder").data()) // "Create Folder"
.setText({bmt::get("Browser.CreateFolder.EnterNewFolderName").data(), colon}) // "Enter a new folder name:"
.setIcon(Icon::Emblem::Folder)
.setAlignment(window)
.create()
@ -287,15 +287,15 @@ auto BrowserDialogWindow::run() -> BrowserDialog::Response {
}
});
renameAction.setIcon(Icon::Application::TextEditor).setText({bms::get("Common.Rename").data(), ellipsis}).onActivate([&] { // "Rename..."
renameAction.setIcon(Icon::Application::TextEditor).setText({bmt::get("Common.Rename").data(), ellipsis}).onActivate([&] { // "Rename..."
auto batched = view.batched();
if(batched.size() != 1) return;
auto name = batched[0].text();
if(directory::exists({state.path, name})) {
if(auto rename = NameDialog()
.setTitle({bms::get("Common.Rename").data(), space, name}) // "Rename "
.setText({bms::get("Browser.Rename.EnterNewFolderName").data(), colon}) // "Enter the new folder name:"
.setTitle({bmt::get("Common.Rename").data(), space, name}) // "Rename "
.setText({bmt::get("Browser.Rename.EnterNewFolderName").data(), colon}) // "Enter the new folder name:"
.setIcon(Icon::Emblem::Folder)
.setAlignment(window)
.rename(name)
@ -304,14 +304,14 @@ auto BrowserDialogWindow::run() -> BrowserDialog::Response {
if(!directory::rename({state.path, name}, {state.path, rename})) {
/* // Commented-out by MT.
return (void)MessageDialog()
.setTitle(bms::get("Common.Error").data()) // "Error"
.setText(bms::get("Browser.Rename.FailedToRenameFolder").data()) // "Failed to rename folder."
.setTitle(bmt::get("Common.Error").data()) // "Error"
.setText(bmt::get("Browser.Rename.FailedToRenameFolder").data()) // "Failed to rename folder."
.setAlignment(window)
.error();
*/
/* MT. */
bmw::showError(bms::get("Browser.Rename.FailedToRenameFolder"), "", window.handle());
bmw::showError(bmt::get("Browser.Rename.FailedToRenameFolder"), "", window.handle());
return;
/* /MT. */
}
@ -319,8 +319,8 @@ auto BrowserDialogWindow::run() -> BrowserDialog::Response {
}
} else if(file::exists({state.path, name})) {
if(auto rename = NameDialog()
.setTitle({bms::get("Common.Rename").data(), space, name}) // "Rename "
.setText({bms::get("Browser.Rename.EnterNewFileName").data(), colon}) // "Enter the new file name:"
.setTitle({bmt::get("Common.Rename").data(), space, name}) // "Rename "
.setText({bmt::get("Browser.Rename.EnterNewFileName").data(), colon}) // "Enter the new file name:"
.setIcon(Icon::Emblem::File)
.setAlignment(window)
.rename(name)
@ -329,14 +329,14 @@ auto BrowserDialogWindow::run() -> BrowserDialog::Response {
if(!file::rename({state.path, name}, {state.path, rename})) {
/* // Commented-out by MT.
return (void)MessageDialog()
.setTitle(bms::get("Common.Error").data()) // "Error"
.setText(bms::get("Browser.Rename.FailedToRenameFile").data()) // "Failed to rename file."
.setTitle(bmt::get("Common.Error").data()) // "Error"
.setText(bmt::get("Browser.Rename.FailedToRenameFile").data()) // "Failed to rename file."
.setAlignment(window)
.error();
*/
/* MT. */
bmw::showError(bms::get("Browser.Rename.FailedToRenameFile"), "", window.handle());
bmw::showError(bmt::get("Browser.Rename.FailedToRenameFile"), "", window.handle());
return;
/* /MT. */
}
@ -346,31 +346,31 @@ auto BrowserDialogWindow::run() -> BrowserDialog::Response {
}
});
removeAction.setIcon(Icon::Action::Remove).setText({bms::get("Common.Delete").data(), ellipsis}).onActivate([&] { // "Delete..."
removeAction.setIcon(Icon::Action::Remove).setText({bmt::get("Common.Delete").data(), ellipsis}).onActivate([&] { // "Delete..."
auto batched = view.batched();
if(!batched) return;
/* // Commented-out by MT.
if(MessageDialog()
.setTitle(bms::get("Browser.Delete.DeleteSelected").data()) // "Remove Selected"
.setText({bms::get("Browser.Delete.confirm").data(), space, batched.size() == 1 ?
bms::get("Browser.Delete.SelectedItem").data() :
bms::get("Browser.Delete.SelectedItems").data(), "?"}) // "Are you sure you want to permanently delete the selected item" // "s"
.setTitle(bmt::get("Browser.Delete.DeleteSelected").data()) // "Remove Selected"
.setText({bmt::get("Browser.Delete.confirm").data(), space, batched.size() == 1 ?
bmt::get("Browser.Delete.SelectedItem").data() :
bmt::get("Browser.Delete.SelectedItems").data(), "?"}) // "Are you sure you want to permanently delete the selected item" // "s"
.setAlignment(window)
.question({bms::get("Common.Yes").data(), bms::get("Common.No").data()}) == bms::get("Common.No").data()) { // "No"
.question({bmt::get("Common.Yes").data(), bmt::get("Common.No").data()}) == bmt::get("Common.No").data()) { // "No"
*/
/* MT. */
string selectedItemsString = batched.size() == 1
? bms::get("Browser.Delete.confirm.item").data()
: bms::get("Browser.Delete.confirm.items").data();
? bmt::get("Browser.Delete.confirm.item").data()
: bmt::get("Browser.Delete.confirm.items").data();
string messageText = {
string(bms::get("Browser.Delete.confirm").data()).replace('|', selectedItemsString), "?"
string(bmt::get("Browser.Delete.confirm").data()).replace('|', selectedItemsString), "?"
};
/* /MT. */
if (!bmw::confirm(messageText.data(), bms::get("Browser.Delete.DeleteSelected"), window.handle())) { // MT.
if (!bmw::confirm(messageText.data(), bmt::get("Browser.Delete.DeleteSelected"), window.handle())) { // MT.
return;
}
@ -378,20 +378,20 @@ auto BrowserDialogWindow::run() -> BrowserDialog::Response {
auto name = item.text();
/* MT. */
string continueMessageText = string(bms::get("Browser.Delete.FailedToDelete").data()).replace('|', name);
string continueMessageText = string(bmt::get("Browser.Delete.FailedToDelete").data()).replace('|', name);
/* /MT. */
if(directory::exists({state.path, name})) {
if(!directory::remove({state.path, name})) {
/* // Commented-out by MT.
if(MessageDialog()
.setTitle(bms::get("Common.Warning").data()) // "Warning"
.setText({bms::get("Browser.Delete.FailedToDelete").data(), space, name, "\n\n",
bms::get("Browser.Delete.continueDeletingRemaining").data(), "?"}) // "Failed to remove " // Continue trying to remove remaining items
.question({bms::get("Common.Yes").data(), bms::get("Common.No").data()}) == bms::get("Common.No").data()) { // "No"
.setTitle(bmt::get("Common.Warning").data()) // "Warning"
.setText({bmt::get("Browser.Delete.FailedToDelete").data(), space, name, "\n\n",
bmt::get("Browser.Delete.continueDeletingRemaining").data(), "?"}) // "Failed to remove " // Continue trying to remove remaining items
.question({bmt::get("Common.Yes").data(), bmt::get("Common.No").data()}) == bmt::get("Common.No").data()) { // "No"
*/
if (!bmw::confirm(continueMessageText.data(), bms::get("Common.Warning"), window.handle())) { // MT.
if (!bmw::confirm(continueMessageText.data(), bmt::get("Common.Warning"), window.handle())) { // MT.
break;
}
}
@ -399,13 +399,13 @@ auto BrowserDialogWindow::run() -> BrowserDialog::Response {
if(!file::remove({state.path, name})) {
/*
if(MessageDialog()
.setTitle(bms::get("Common.Warning").data()) // "Warning"
.setText({bms::get("Browser.Delete.FailedToDelete").data(), space, name, "\n\n",
bms::get("Browser.Delete.continueDeletingRemaining").data(), "?"}) // "Failed to remove " // Continue trying to remove remaining items
.question({bms::get("Common.Yes").data(), bms::get("Common.No").data()}) == bms::get("Common.No").data()) { // "No"
.setTitle(bmt::get("Common.Warning").data()) // "Warning"
.setText({bmt::get("Browser.Delete.FailedToDelete").data(), space, name, "\n\n",
bmt::get("Browser.Delete.continueDeletingRemaining").data(), "?"}) // "Failed to remove " // Continue trying to remove remaining items
.question({bmt::get("Common.Yes").data(), bmt::get("Common.No").data()}) == bmt::get("Common.No").data()) { // "No"
*/
if (!bmw::confirm(continueMessageText.data(), bms::get("Common.Warning"), window.handle())) { // MT.
if (!bmw::confirm(continueMessageText.data(), bmt::get("Common.Warning"), window.handle())) { // MT.
break;
}
}
@ -414,7 +414,7 @@ auto BrowserDialogWindow::run() -> BrowserDialog::Response {
pathRefresh.doActivate();
});
showHiddenOption.setChecked(settings.showHidden).setText(bms::get("Browser.ShowHidden").data()).onToggle([&] { // "Show Hidden"
showHiddenOption.setChecked(settings.showHidden).setText(bmt::get("Browser.ShowHidden").data()).onToggle([&] { // "Show Hidden"
auto document = BML::unserialize(file::read({Path::userSettings(), "hiro/browser-dialog.bml"}));
document("BrowserDialog/ShowHidden").setValue(showHiddenOption.checked());
directory::create({Path::userSettings(), "hiro/"});
@ -498,28 +498,28 @@ auto BrowserDialog::filters() const -> vector<string> {
auto BrowserDialog::openFile() -> string {
state.action = "openFile";
if(!state.title) state.title = bms::get("Browser.OpenFile").data(); // "Open File"
if(!state.title) state.title = bmt::get("Browser.OpenFile").data(); // "Open File"
if(auto result = _run()) return result.left();
return {};
}
auto BrowserDialog::openFiles() -> vector<string> {
state.action = "openFiles";
if(!state.title) state.title = bms::get("Browser.OpenFiles").data(); // "Open Files"
if(!state.title) state.title = bmt::get("Browser.OpenFiles").data(); // "Open Files"
if(auto result = _run()) return result;
return {};
}
auto BrowserDialog::openFolder() -> string {
state.action = "openFolder";
if(!state.title) state.title = bms::get("Browser.OpenFolder").data(); // "Open Folder"
if(!state.title) state.title = bmt::get("Browser.OpenFolder").data(); // "Open Folder"
if(auto result = _run()) return result.left();
return {};
}
auto BrowserDialog::openObject() -> string {
state.action = "openObject";
if(!state.title) state.title = bms::get("Browser.OpenObject").data(); // "Open Object"
if(!state.title) state.title = bmt::get("Browser.OpenObject").data(); // "Open Object"
if(auto result = _run()) return result.left();
return {};
}
@ -534,7 +534,7 @@ auto BrowserDialog::path() const -> string {
auto BrowserDialog::saveFile() -> string {
state.action = "saveFile";
if(!state.title) state.title = bms::get("Browser.SaveFile").data(); // "Save File"
if(!state.title) state.title = bmt::get("Browser.SaveFile").data(); // "Save File"
if(auto result = _run()) return result.left();
return {};
}
@ -545,7 +545,7 @@ auto BrowserDialog::selected() -> vector<string> {
auto BrowserDialog::selectFolder() -> string {
state.action = "selectFolder";
if(!state.title) state.title = bms::get("Browser.SelectFolder").data(); // "Select Folder"
if(!state.title) state.title = bmt::get("Browser.SelectFolder").data(); // "Select Folder"
if(auto result = _run()) return result.left();
return {};
}

View file

@ -8,7 +8,7 @@ NameDialog::NameDialog() {
response = nameValue.text();
window.doClose();
});
cancelButton.setText(bms::get("Common.Cancel").data()).onActivate([&] { window.doClose(); }); // "Cancel"
cancelButton.setText(bmt::get("Common.Cancel").data()).onActivate([&] { window.doClose(); }); // "Cancel"
window.onClose([&] {
window.setModal(false);
@ -56,10 +56,10 @@ auto NameDialog::setTitle(const string& title) -> type& {
auto NameDialog::show(string mode, string name) -> string {
response = {};
setTitle(state.title);
if(!state.title && mode == "Create") setTitle(bms::get("Browser.Create").data()); // "Create"
if(!state.title && mode == "Rename") setTitle({bms::get("Common.Rename").data(), ' ', name}); // "Rename "
if(!state.title && mode == "Create") setTitle(bmt::get("Browser.Create").data()); // "Create"
if(!state.title && mode == "Rename") setTitle({bmt::get("Common.Rename").data(), ' ', name}); // "Rename "
string enterNameString = {bms::get("Browser.Create.EnterName").data(), ':'}; // MT.
string enterNameString = {bmt::get("Browser.Create.EnterName").data(), ':'}; // MT.
textLabel.setText(state.text ? state.text : enterNameString); // "Enter a name:"
@ -71,7 +71,7 @@ auto NameDialog::show(string mode, string name) -> string {
typeIcon.setVisible(false);
}
nameValue.setText(name);
acceptButton.setText(mode == "Rename" ? bms::get("Common.Rename").data() : bms::get("Browser.Create").data());
acceptButton.setText(mode == "Rename" ? bmt::get("Common.Rename").data() : bmt::get("Browser.Create").data());
window.setTitle(state.title);
window.setSize({400_sx, layout.minimumSize().height()});
window.setAlignment(state.relativeTo, state.alignment);

View file

@ -4,9 +4,11 @@
#include <string>
#include "bsnes-mt/strings.h"
#include "bsnes-mt/translations.h"
#include "bsnes-mt/utils.h"
namespace bms = bsnesMt::strings;
namespace bmt = bsnesMt::translations;
/* /MT. */
namespace hiro {
@ -72,7 +74,7 @@ static auto BrowserWindow_fileDialog(bool save, BrowserWindow::State& state) ->
auto pBrowserWindow::directory(BrowserWindow::State& state) -> string {
wchar_t wname[PATH_MAX + 1] = L"";
auto chooseFolder = bsnesMt::utf8ToWideString(std::string("\n") + bms::get("Browser.ChooseFolder") + ":"); // MT.
auto chooseFolder = bms::utf8ToWideString(std::string("\n") + bmt::get("Browser.ChooseFolder") + ":"); // MT.
BROWSEINFO bi;
bi.hwndOwner = state.parent ? state.parent->self()->hwnd : 0;