diff --git a/Utilities/Config.h b/Utilities/Config.h index a3f3f1354e..5f8b188ff4 100644 --- a/Utilities/Config.h +++ b/Utilities/Config.h @@ -285,8 +285,8 @@ namespace cfg int_type def; // Expose range - static const s64 max = Max; - static const s64 min = Min; + static constexpr s64 max = Max; + static constexpr s64 min = Min; _int(node* owner, const std::string& name, int_type def = std::min(Max, std::max(Min, 0)), bool dynamic = false) : _base(type::_int, owner, name, dynamic) @@ -334,6 +334,7 @@ namespace cfg void set(const s64& value) { + ensure(value >= Min && value <= Max); m_value = static_cast(value); } @@ -405,6 +406,7 @@ namespace cfg void set(const f64& value) { + ensure(value >= Min && value <= Max); m_value = static_cast(value); } @@ -435,8 +437,8 @@ namespace cfg int_type def; // Expose range - static const u64 max = Max; - static const u64 min = Min; + static constexpr u64 max = Max; + static constexpr u64 min = Min; uint(node* owner, const std::string& name, int_type def = std::max(Min, 0), bool dynamic = false) : _base(type::uint, owner, name, dynamic) @@ -484,6 +486,7 @@ namespace cfg void set(const u64& value) { + ensure(value >= Min && value <= Max); m_value = static_cast(value); } diff --git a/rpcs3/Emu/Cell/Modules/cellAudio.h b/rpcs3/Emu/Cell/Modules/cellAudio.h index f047324b69..3b1b921d05 100644 --- a/rpcs3/Emu/Cell/Modules/cellAudio.h +++ b/rpcs3/Emu/Cell/Modules/cellAudio.h @@ -427,5 +427,5 @@ using cell_audio = named_thread; namespace audio { cell_audio_config::raw_config get_raw_config(); - void configure_audio(bool force_reset = false); + extern void configure_audio(bool force_reset = false); } diff --git a/rpcs3/Emu/Cell/lv2/sys_rsxaudio.cpp b/rpcs3/Emu/Cell/lv2/sys_rsxaudio.cpp index eb4b0bca8d..07bcb48b77 100644 --- a/rpcs3/Emu/Cell/lv2/sys_rsxaudio.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_rsxaudio.cpp @@ -1268,7 +1268,7 @@ bool rsxaudio_data_thread::enqueue_data(RsxaudioPort dst, bool silence, const vo namespace audio { - void configure_rsxaudio() + extern void configure_rsxaudio() { if (g_cfg.audio.provider == audio_provider::rsxaudio && g_fxo->is_init()) { diff --git a/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu.cpp b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu.cpp new file mode 100644 index 0000000000..f6d2952daa --- /dev/null +++ b/rpcs3/Emu/RSX/Overlays/HomeMenu/overlay_home_menu.cpp @@ -0,0 +1,217 @@ +#include "stdafx.h" +#include "overlay_home_menu.h" +#include "Emu/RSX/RSXThread.h" + +namespace rsx +{ + namespace overlays + { + std::string get_time_string() + { + std::ostringstream ost; + const std::time_t dateTime = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now()); + const std::tm tm = *std::localtime(&dateTime); + ost << std::put_time(&tm, "%Y/%m/%e %H:%M:%S"); + return ost.str(); + } + + home_menu_dialog::home_menu_dialog() + { + m_allow_input_on_pause = true; + + m_dim_background = std::make_unique(); + m_dim_background->set_size(overlay::virtual_width, overlay::virtual_height); + m_dim_background->back_color.a = 0.5f; + + m_main_menu = std::make_unique(20, 85, 1240, 540, false, nullptr); + + m_description = std::make_unique