mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-12-06 07:12:28 +01:00
System: expose date format and time format as settings
Some checks are pending
Generate Translation Template / Generate Translation Template (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux-aarch64.sh, gcc, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (51ae32f468089a8169aaf1567de355ff4a3e0842, rpcs3/rpcs3-binaries-mac, arch -X86_64 .ci/build-mac.sh, Intel) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (8e21bdbc40711a3fccd18fbf17b742348b0f4281, rpcs3/rpcs3-binaries-mac-arm64, .ci/build-mac-arm64.sh, Apple Silicon) (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run
Build RPCS3 / RPCS3 Windows Clang (win64, clang, clang64) (push) Waiting to run
Build RPCS3 / RPCS3 FreeBSD (push) Waiting to run
Some checks are pending
Generate Translation Template / Generate Translation Template (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux-aarch64.sh, gcc, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (/rpcs3/.ci/build-linux.sh, gcc, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (a1d35836e8d45bfc6f63c26f0a3e5d46ef622fe1, rpcs3/rpcs3-binaries-linux-arm64, /rpcs3/.ci/build-linux-aarch64.sh, clang, rpcs3/rpcs3-ci-jammy-aarch64:1.6, ubuntu-24.04-arm) (push) Waiting to run
Build RPCS3 / RPCS3 Linux ${{ matrix.os }} ${{ matrix.compiler }} (d812f1254a1157c80fd402f94446310560f54e5f, rpcs3/rpcs3-binaries-linux, /rpcs3/.ci/build-linux.sh, clang, rpcs3/rpcs3-ci-jammy:1.6, ubuntu-24.04) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (51ae32f468089a8169aaf1567de355ff4a3e0842, rpcs3/rpcs3-binaries-mac, arch -X86_64 .ci/build-mac.sh, Intel) (push) Waiting to run
Build RPCS3 / RPCS3 Mac ${{ matrix.name }} (8e21bdbc40711a3fccd18fbf17b742348b0f4281, rpcs3/rpcs3-binaries-mac-arm64, .ci/build-mac-arm64.sh, Apple Silicon) (push) Waiting to run
Build RPCS3 / RPCS3 Windows (push) Waiting to run
Build RPCS3 / RPCS3 Windows Clang (win64, clang, clang64) (push) Waiting to run
Build RPCS3 / RPCS3 FreeBSD (push) Waiting to run
This commit is contained in:
parent
09f8c6ddcd
commit
eb6d13a8c0
|
|
@ -426,11 +426,11 @@ error_code cellSysutilGetSystemParamInt(CellSysutilParamId id, vm::ptr<s32> valu
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_DATE_FORMAT:
|
case CELL_SYSUTIL_SYSTEMPARAM_ID_DATE_FORMAT:
|
||||||
*value = CELL_SYSUTIL_DATE_FMT_DDMMYYYY;
|
*value = static_cast<s32>(g_cfg.sys.date_fmt.get());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_TIME_FORMAT:
|
case CELL_SYSUTIL_SYSTEMPARAM_ID_TIME_FORMAT:
|
||||||
*value = CELL_SYSUTIL_TIME_FMT_CLOCK24;
|
*value = static_cast<s32>(g_cfg.sys.time_fmt.get());
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CELL_SYSUTIL_SYSTEMPARAM_ID_TIMEZONE:
|
case CELL_SYSUTIL_SYSTEMPARAM_ID_TIMEZONE:
|
||||||
|
|
|
||||||
|
|
@ -301,6 +301,8 @@ struct cfg_root : cfg::node
|
||||||
cfg::_enum<CellSysutilLang> language{ this, "Language", CellSysutilLang{1} }; // CELL_SYSUTIL_LANG_ENGLISH_US
|
cfg::_enum<CellSysutilLang> language{ this, "Language", CellSysutilLang{1} }; // CELL_SYSUTIL_LANG_ENGLISH_US
|
||||||
cfg::_enum<CellKbMappingType> keyboard_type{ this, "Keyboard Type", CellKbMappingType{0} }; // CELL_KB_MAPPING_101 = US
|
cfg::_enum<CellKbMappingType> keyboard_type{ this, "Keyboard Type", CellKbMappingType{0} }; // CELL_KB_MAPPING_101 = US
|
||||||
cfg::_enum<enter_button_assign> enter_button_assignment{ this, "Enter button assignment", enter_button_assign::cross };
|
cfg::_enum<enter_button_assign> enter_button_assignment{ this, "Enter button assignment", enter_button_assign::cross };
|
||||||
|
cfg::_enum<date_format> date_fmt{ this, "Date Format", date_format::ddmmyyyy };
|
||||||
|
cfg::_enum<time_format> time_fmt{ this, "Time Format", time_format::clock24 };
|
||||||
cfg::_int<-60*60*24*365*100LL, 60*60*24*365*100LL> console_time_offset{ this, "Console time offset (s)", 0 }; // console time offset, limited to +/-100years
|
cfg::_int<-60*60*24*365*100LL, 60*60*24*365*100LL> console_time_offset{ this, "Console time offset (s)", 0 }; // console time offset, limited to +/-100years
|
||||||
cfg::string system_name{this, "System Name", get_random_system_name()};
|
cfg::string system_name{this, "System Name", get_random_system_name()};
|
||||||
cfg::uint<0, umax> console_psid_high{this, "PSID high"};
|
cfg::uint<0, umax> console_psid_high{this, "PSID high"};
|
||||||
|
|
|
||||||
|
|
@ -716,3 +716,34 @@ void fmt_class_string<xfloat_accuracy>::format(std::string& out, u64 arg)
|
||||||
return unknown;
|
return unknown;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
void fmt_class_string<date_format>::format(std::string& out, u64 arg)
|
||||||
|
{
|
||||||
|
format_enum(out, arg, [](date_format value)
|
||||||
|
{
|
||||||
|
switch (value)
|
||||||
|
{
|
||||||
|
case date_format::yyyymmdd: return "yyyymmdd";
|
||||||
|
case date_format::ddmmyyyy: return "ddmmyyyy";
|
||||||
|
case date_format::mmddyyyy: return "mmddyyyy";
|
||||||
|
}
|
||||||
|
|
||||||
|
return unknown;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
template <>
|
||||||
|
void fmt_class_string<time_format>::format(std::string& out, u64 arg)
|
||||||
|
{
|
||||||
|
format_enum(out, arg, [](time_format value)
|
||||||
|
{
|
||||||
|
switch (value)
|
||||||
|
{
|
||||||
|
case time_format::clock12: return "clock12";
|
||||||
|
case time_format::clock24: return "clock24";
|
||||||
|
}
|
||||||
|
|
||||||
|
return unknown;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -261,6 +261,19 @@ enum class enter_button_assign
|
||||||
cross // CELL_SYSUTIL_ENTER_BUTTON_ASSIGN_CROSS
|
cross // CELL_SYSUTIL_ENTER_BUTTON_ASSIGN_CROSS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum class date_format
|
||||||
|
{
|
||||||
|
yyyymmdd, // CELL_SYSUTIL_DATE_FMT_YYYYMMDD
|
||||||
|
ddmmyyyy, // CELL_SYSUTIL_DATE_FMT_DDMMYYYY
|
||||||
|
mmddyyyy // CELL_SYSUTIL_DATE_FMT_MMDDYYYY
|
||||||
|
};
|
||||||
|
|
||||||
|
enum class time_format
|
||||||
|
{
|
||||||
|
clock12, // CELL_SYSUTIL_TIME_FMT_CLOCK12
|
||||||
|
clock24 // CELL_SYSUTIL_TIME_FMT_CLOCK24
|
||||||
|
};
|
||||||
|
|
||||||
enum class np_internet_status
|
enum class np_internet_status
|
||||||
{
|
{
|
||||||
disabled,
|
disabled,
|
||||||
|
|
|
||||||
|
|
@ -1336,6 +1336,21 @@ QString emu_settings::GetLocalizedSetting(const QString& original, emu_settings_
|
||||||
case vk_gpu_scheduler_mode::fast: return tr("Fast", "Asynchronous Queue Scheduler");
|
case vk_gpu_scheduler_mode::fast: return tr("Fast", "Asynchronous Queue Scheduler");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case emu_settings_type::DateFormat:
|
||||||
|
switch (static_cast<date_format>(index))
|
||||||
|
{
|
||||||
|
case date_format::yyyymmdd: return tr("Year/Month/Day", "Date Format");
|
||||||
|
case date_format::ddmmyyyy: return tr("Day/Month/Year", "Date Format");
|
||||||
|
case date_format::mmddyyyy: return tr("Month/Day/Year", "Date Format");
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case emu_settings_type::TimeFormat:
|
||||||
|
switch (static_cast<time_format>(index))
|
||||||
|
{
|
||||||
|
case time_format::clock12: return tr("12-hour clock", "Time Format");
|
||||||
|
case time_format::clock24: return tr("24-hour clock", "Time Format");
|
||||||
|
}
|
||||||
|
break;
|
||||||
case emu_settings_type::Language:
|
case emu_settings_type::Language:
|
||||||
switch (static_cast<CellSysutilLang>(index))
|
switch (static_cast<CellSysutilLang>(index))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -203,11 +203,15 @@ enum class emu_settings_type
|
||||||
Language,
|
Language,
|
||||||
KeyboardType,
|
KeyboardType,
|
||||||
EnterButtonAssignment,
|
EnterButtonAssignment,
|
||||||
|
DateFormat,
|
||||||
|
TimeFormat,
|
||||||
|
ConsoleTimeOffset,
|
||||||
|
|
||||||
|
// VFS
|
||||||
EnableHostRoot,
|
EnableHostRoot,
|
||||||
EmptyHdd0Tmp,
|
EmptyHdd0Tmp,
|
||||||
LimitCacheSize,
|
LimitCacheSize,
|
||||||
MaximumCacheSize,
|
MaximumCacheSize,
|
||||||
ConsoleTimeOffset,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/** A helper map that keeps track of where a given setting type is located*/
|
/** A helper map that keeps track of where a given setting type is located*/
|
||||||
|
|
@ -407,11 +411,14 @@ inline static const std::map<emu_settings_type, cfg_location> settings_location
|
||||||
{ emu_settings_type::Language, { "System", "Language"}},
|
{ emu_settings_type::Language, { "System", "Language"}},
|
||||||
{ emu_settings_type::KeyboardType, { "System", "Keyboard Type"}},
|
{ emu_settings_type::KeyboardType, { "System", "Keyboard Type"}},
|
||||||
{ emu_settings_type::EnterButtonAssignment, { "System", "Enter button assignment"}},
|
{ emu_settings_type::EnterButtonAssignment, { "System", "Enter button assignment"}},
|
||||||
|
{ emu_settings_type::DateFormat, { "System", "Date Format"}},
|
||||||
|
{ emu_settings_type::TimeFormat, { "System", "Time Format"}},
|
||||||
|
{ emu_settings_type::ConsoleTimeOffset, { "System", "Console time offset (s)"}},
|
||||||
|
|
||||||
{ emu_settings_type::EnableHostRoot, { "VFS", "Enable /host_root/"}},
|
{ emu_settings_type::EnableHostRoot, { "VFS", "Enable /host_root/"}},
|
||||||
{ emu_settings_type::EmptyHdd0Tmp, { "VFS", "Empty /dev_hdd0/tmp/"}},
|
{ emu_settings_type::EmptyHdd0Tmp, { "VFS", "Empty /dev_hdd0/tmp/"}},
|
||||||
{ emu_settings_type::LimitCacheSize, { "VFS", "Limit disk cache size"}},
|
{ emu_settings_type::LimitCacheSize, { "VFS", "Limit disk cache size"}},
|
||||||
{ emu_settings_type::MaximumCacheSize, { "VFS", "Disk cache maximum size (MB)"}},
|
{ emu_settings_type::MaximumCacheSize, { "VFS", "Disk cache maximum size (MB)"}},
|
||||||
{ emu_settings_type::ConsoleTimeOffset, { "System", "Console time offset (s)"}},
|
|
||||||
|
|
||||||
// Savestates
|
// Savestates
|
||||||
{ emu_settings_type::SuspendEmulationSavestateMode, { "Savestate", "Suspend Emulation Savestate Mode" }},
|
{ emu_settings_type::SuspendEmulationSavestateMode, { "Savestate", "Suspend Emulation Savestate Mode" }},
|
||||||
|
|
|
||||||
|
|
@ -1412,6 +1412,12 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
|
||||||
m_emu_settings->EnhanceComboBox(ui->keyboardType, emu_settings_type::KeyboardType, false, false, 0, true);
|
m_emu_settings->EnhanceComboBox(ui->keyboardType, emu_settings_type::KeyboardType, false, false, 0, true);
|
||||||
SubscribeTooltip(ui->gb_keyboardType, tooltips.settings.keyboard_type);
|
SubscribeTooltip(ui->gb_keyboardType, tooltips.settings.keyboard_type);
|
||||||
|
|
||||||
|
m_emu_settings->EnhanceComboBox(ui->dateFormat, emu_settings_type::DateFormat);
|
||||||
|
SubscribeTooltip(ui->gb_dateFormat, tooltips.settings.date_format);
|
||||||
|
|
||||||
|
m_emu_settings->EnhanceComboBox(ui->timeFormat, emu_settings_type::TimeFormat);
|
||||||
|
SubscribeTooltip(ui->gb_timeFormat, tooltips.settings.time_format);
|
||||||
|
|
||||||
// Checkboxes
|
// Checkboxes
|
||||||
|
|
||||||
m_emu_settings->EnhanceCheckBox(ui->enableHostRoot, emu_settings_type::EnableHostRoot);
|
m_emu_settings->EnhanceCheckBox(ui->enableHostRoot, emu_settings_type::EnableHostRoot);
|
||||||
|
|
|
||||||
|
|
@ -2008,6 +2008,30 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="gb_dateFormat">
|
||||||
|
<property name="title">
|
||||||
|
<string>Date Format</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_dateFormat">
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="dateFormat"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="gb_timeFormat">
|
||||||
|
<property name="title">
|
||||||
|
<string>Time Format</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_timeFormat">
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="timeFormat"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QGroupBox" name="gb_console_time">
|
<widget class="QGroupBox" name="gb_console_time">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
|
|
||||||
|
|
@ -263,6 +263,8 @@ public:
|
||||||
|
|
||||||
const QString license_area = tr("The console region defines the license area of the PS3.\nDepending on the license area, some games may not work.");
|
const QString license_area = tr("The console region defines the license area of the PS3.\nDepending on the license area, some games may not work.");
|
||||||
const QString system_language = tr("Some games may fail to boot if the system language is not available in the game itself.\nOther games will switch language automatically to what is selected here.\nIt is recommended leaving this on a language supported by the game.");
|
const QString system_language = tr("Some games may fail to boot if the system language is not available in the game itself.\nOther games will switch language automatically to what is selected here.\nIt is recommended leaving this on a language supported by the game.");
|
||||||
|
const QString date_format = tr("Select the PS3's date format.");
|
||||||
|
const QString time_format = tr("Select the PS3's time format.");
|
||||||
const QString keyboard_type = tr("Sets the used keyboard layout.\nCurrently only US, Japanese and German layouts are fully supported at this moment.");
|
const QString keyboard_type = tr("Sets the used keyboard layout.\nCurrently only US, Japanese and German layouts are fully supported at this moment.");
|
||||||
const QString enter_button_assignment = tr("The button used for enter/accept/confirm in system dialogs.\nChange this to use the Circle button instead, which is the default configuration on Japanese systems and in many Japanese games.\nIn these cases having the cross button assigned can often lead to confusion.");
|
const QString enter_button_assignment = tr("The button used for enter/accept/confirm in system dialogs.\nChange this to use the Circle button instead, which is the default configuration on Japanese systems and in many Japanese games.\nIn these cases having the cross button assigned can often lead to confusion.");
|
||||||
const QString enable_host_root = tr("Required for some Homebrew.\nIf unsure, do not use this option.");
|
const QString enable_host_root = tr("Required for some Homebrew.\nIf unsure, do not use this option.");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue