diff options
23 files changed, 59 insertions, 72 deletions
diff --git a/dist/qt_themes/qdarkstyle/style.qss b/dist/qt_themes/qdarkstyle/style.qss index 2d5c9761f..2926a05fa 100644 --- a/dist/qt_themes/qdarkstyle/style.qss +++ b/dist/qt_themes/qdarkstyle/style.qss | |||
| @@ -654,7 +654,11 @@ QAbstractSpinBox::down-arrow:hover { | |||
| 654 | image: url(:/qss_icons/rc/down_arrow.png); | 654 | image: url(:/qss_icons/rc/down_arrow.png); |
| 655 | } | 655 | } |
| 656 | 656 | ||
| 657 | QLabel, | 657 | QLabel { |
| 658 | border: 0; | ||
| 659 | background: transparent; | ||
| 660 | } | ||
| 661 | |||
| 658 | QTabWidget { | 662 | QTabWidget { |
| 659 | border: 0; | 663 | border: 0; |
| 660 | } | 664 | } |
| @@ -1269,4 +1273,4 @@ QPushButton#RendererStatusBarButton:checked { | |||
| 1269 | 1273 | ||
| 1270 | QPushButton#RendererStatusBarButton:!checked{ | 1274 | QPushButton#RendererStatusBarButton:!checked{ |
| 1271 | color: #00ccdd; | 1275 | color: #00ccdd; |
| 1272 | } \ No newline at end of file | 1276 | } |
diff --git a/dist/qt_themes/qdarkstyle_midnight_blue/style.qss b/dist/qt_themes/qdarkstyle_midnight_blue/style.qss index be645c907..9c24b0d07 100644 --- a/dist/qt_themes/qdarkstyle_midnight_blue/style.qss +++ b/dist/qt_themes/qdarkstyle_midnight_blue/style.qss | |||
| @@ -875,7 +875,7 @@ https://doc.qt.io/qt-5/stylesheet-examples.html#customizing-qframe | |||
| 875 | 875 | ||
| 876 | --------------------------------------------------------------------------- */ | 876 | --------------------------------------------------------------------------- */ |
| 877 | QLabel { | 877 | QLabel { |
| 878 | background-color: #19232D; | 878 | background: transparent; |
| 879 | border: 0px solid #32414B; | 879 | border: 0px solid #32414B; |
| 880 | padding: 2px; | 880 | padding: 2px; |
| 881 | margin: 0px; | 881 | margin: 0px; |
| @@ -883,7 +883,6 @@ QLabel { | |||
| 883 | } | 883 | } |
| 884 | 884 | ||
| 885 | QLabel:disabled { | 885 | QLabel:disabled { |
| 886 | background-color: #19232D; | ||
| 887 | border: 0px solid #32414B; | 886 | border: 0px solid #32414B; |
| 888 | color: #787878; | 887 | color: #787878; |
| 889 | } | 888 | } |
diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp index f80ab92e4..7be5d5087 100644 --- a/src/audio_core/stream.cpp +++ b/src/audio_core/stream.cpp | |||
| @@ -36,9 +36,10 @@ Stream::Stream(Core::Timing::CoreTiming& core_timing, u32 sample_rate, Format fo | |||
| 36 | ReleaseCallback&& release_callback, SinkStream& sink_stream, std::string&& name_) | 36 | ReleaseCallback&& release_callback, SinkStream& sink_stream, std::string&& name_) |
| 37 | : sample_rate{sample_rate}, format{format}, release_callback{std::move(release_callback)}, | 37 | : sample_rate{sample_rate}, format{format}, release_callback{std::move(release_callback)}, |
| 38 | sink_stream{sink_stream}, core_timing{core_timing}, name{std::move(name_)} { | 38 | sink_stream{sink_stream}, core_timing{core_timing}, name{std::move(name_)} { |
| 39 | 39 | release_event = | |
| 40 | release_event = Core::Timing::CreateEvent( | 40 | Core::Timing::CreateEvent(name, [this](std::uintptr_t, std::chrono::nanoseconds ns_late) { |
| 41 | name, [this](u64, std::chrono::nanoseconds ns_late) { ReleaseActiveBuffer(ns_late); }); | 41 | ReleaseActiveBuffer(ns_late); |
| 42 | }); | ||
| 42 | } | 43 | } |
| 43 | 44 | ||
| 44 | void Stream::Play() { | 45 | void Stream::Play() { |
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index b5feb3f24..71af26ec5 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp | |||
| @@ -23,7 +23,7 @@ std::shared_ptr<EventType> CreateEvent(std::string name, TimedCallback&& callbac | |||
| 23 | struct CoreTiming::Event { | 23 | struct CoreTiming::Event { |
| 24 | u64 time; | 24 | u64 time; |
| 25 | u64 fifo_order; | 25 | u64 fifo_order; |
| 26 | u64 userdata; | 26 | std::uintptr_t user_data; |
| 27 | std::weak_ptr<EventType> type; | 27 | std::weak_ptr<EventType> type; |
| 28 | 28 | ||
| 29 | // Sort by time, unless the times are the same, in which case sort by | 29 | // Sort by time, unless the times are the same, in which case sort by |
| @@ -58,7 +58,7 @@ void CoreTiming::Initialize(std::function<void()>&& on_thread_init_) { | |||
| 58 | event_fifo_id = 0; | 58 | event_fifo_id = 0; |
| 59 | shutting_down = false; | 59 | shutting_down = false; |
| 60 | ticks = 0; | 60 | ticks = 0; |
| 61 | const auto empty_timed_callback = [](u64, std::chrono::nanoseconds) {}; | 61 | const auto empty_timed_callback = [](std::uintptr_t, std::chrono::nanoseconds) {}; |
| 62 | ev_lost = CreateEvent("_lost_event", empty_timed_callback); | 62 | ev_lost = CreateEvent("_lost_event", empty_timed_callback); |
| 63 | if (is_multicore) { | 63 | if (is_multicore) { |
| 64 | timer_thread = std::make_unique<std::thread>(ThreadEntry, std::ref(*this)); | 64 | timer_thread = std::make_unique<std::thread>(ThreadEntry, std::ref(*this)); |
| @@ -107,22 +107,24 @@ bool CoreTiming::HasPendingEvents() const { | |||
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | void CoreTiming::ScheduleEvent(std::chrono::nanoseconds ns_into_future, | 109 | void CoreTiming::ScheduleEvent(std::chrono::nanoseconds ns_into_future, |
| 110 | const std::shared_ptr<EventType>& event_type, u64 userdata) { | 110 | const std::shared_ptr<EventType>& event_type, |
| 111 | std::uintptr_t user_data) { | ||
| 111 | { | 112 | { |
| 112 | std::scoped_lock scope{basic_lock}; | 113 | std::scoped_lock scope{basic_lock}; |
| 113 | const u64 timeout = static_cast<u64>((GetGlobalTimeNs() + ns_into_future).count()); | 114 | const u64 timeout = static_cast<u64>((GetGlobalTimeNs() + ns_into_future).count()); |
| 114 | 115 | ||
| 115 | event_queue.emplace_back(Event{timeout, event_fifo_id++, userdata, event_type}); | 116 | event_queue.emplace_back(Event{timeout, event_fifo_id++, user_data, event_type}); |
| 116 | 117 | ||
| 117 | std::push_heap(event_queue.begin(), event_queue.end(), std::greater<>()); | 118 | std::push_heap(event_queue.begin(), event_queue.end(), std::greater<>()); |
| 118 | } | 119 | } |
| 119 | event.Set(); | 120 | event.Set(); |
| 120 | } | 121 | } |
| 121 | 122 | ||
| 122 | void CoreTiming::UnscheduleEvent(const std::shared_ptr<EventType>& event_type, u64 userdata) { | 123 | void CoreTiming::UnscheduleEvent(const std::shared_ptr<EventType>& event_type, |
| 124 | std::uintptr_t user_data) { | ||
| 123 | std::scoped_lock scope{basic_lock}; | 125 | std::scoped_lock scope{basic_lock}; |
| 124 | const auto itr = std::remove_if(event_queue.begin(), event_queue.end(), [&](const Event& e) { | 126 | const auto itr = std::remove_if(event_queue.begin(), event_queue.end(), [&](const Event& e) { |
| 125 | return e.type.lock().get() == event_type.get() && e.userdata == userdata; | 127 | return e.type.lock().get() == event_type.get() && e.user_data == user_data; |
| 126 | }); | 128 | }); |
| 127 | 129 | ||
| 128 | // Removing random items breaks the invariant so we have to re-establish it. | 130 | // Removing random items breaks the invariant so we have to re-establish it. |
| @@ -197,7 +199,7 @@ std::optional<s64> CoreTiming::Advance() { | |||
| 197 | 199 | ||
| 198 | if (const auto event_type{evt.type.lock()}) { | 200 | if (const auto event_type{evt.type.lock()}) { |
| 199 | event_type->callback( | 201 | event_type->callback( |
| 200 | evt.userdata, std::chrono::nanoseconds{static_cast<s64>(global_timer - evt.time)}); | 202 | evt.user_data, std::chrono::nanoseconds{static_cast<s64>(global_timer - evt.time)}); |
| 201 | } | 203 | } |
| 202 | 204 | ||
| 203 | basic_lock.lock(); | 205 | basic_lock.lock(); |
diff --git a/src/core/core_timing.h b/src/core/core_timing.h index 120c74e46..b0b6036e4 100644 --- a/src/core/core_timing.h +++ b/src/core/core_timing.h | |||
| @@ -22,7 +22,8 @@ | |||
| 22 | namespace Core::Timing { | 22 | namespace Core::Timing { |
| 23 | 23 | ||
| 24 | /// A callback that may be scheduled for a particular core timing event. | 24 | /// A callback that may be scheduled for a particular core timing event. |
| 25 | using TimedCallback = std::function<void(u64 userdata, std::chrono::nanoseconds ns_late)>; | 25 | using TimedCallback = |
| 26 | std::function<void(std::uintptr_t user_data, std::chrono::nanoseconds ns_late)>; | ||
| 26 | 27 | ||
| 27 | /// Contains the characteristics of a particular event. | 28 | /// Contains the characteristics of a particular event. |
| 28 | struct EventType { | 29 | struct EventType { |
| @@ -94,9 +95,9 @@ public: | |||
| 94 | 95 | ||
| 95 | /// Schedules an event in core timing | 96 | /// Schedules an event in core timing |
| 96 | void ScheduleEvent(std::chrono::nanoseconds ns_into_future, | 97 | void ScheduleEvent(std::chrono::nanoseconds ns_into_future, |
| 97 | const std::shared_ptr<EventType>& event_type, u64 userdata = 0); | 98 | const std::shared_ptr<EventType>& event_type, std::uintptr_t user_data = 0); |
| 98 | 99 | ||
| 99 | void UnscheduleEvent(const std::shared_ptr<EventType>& event_type, u64 userdata); | 100 | void UnscheduleEvent(const std::shared_ptr<EventType>& event_type, std::uintptr_t user_data); |
| 100 | 101 | ||
| 101 | /// We only permit one event of each type in the queue at a time. | 102 | /// We only permit one event of each type in the queue at a time. |
| 102 | void RemoveEvent(const std::shared_ptr<EventType>& event_type); | 103 | void RemoveEvent(const std::shared_ptr<EventType>& event_type); |
diff --git a/src/core/hardware_interrupt_manager.cpp b/src/core/hardware_interrupt_manager.cpp index efc1030c1..645f26e91 100644 --- a/src/core/hardware_interrupt_manager.cpp +++ b/src/core/hardware_interrupt_manager.cpp | |||
| @@ -11,8 +11,8 @@ | |||
| 11 | namespace Core::Hardware { | 11 | namespace Core::Hardware { |
| 12 | 12 | ||
| 13 | InterruptManager::InterruptManager(Core::System& system_in) : system(system_in) { | 13 | InterruptManager::InterruptManager(Core::System& system_in) : system(system_in) { |
| 14 | gpu_interrupt_event = | 14 | gpu_interrupt_event = Core::Timing::CreateEvent( |
| 15 | Core::Timing::CreateEvent("GPUInterrupt", [this](u64 message, std::chrono::nanoseconds) { | 15 | "GPUInterrupt", [this](std::uintptr_t message, std::chrono::nanoseconds) { |
| 16 | auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv"); | 16 | auto nvdrv = system.ServiceManager().GetService<Service::Nvidia::NVDRV>("nvdrv"); |
| 17 | const u32 syncpt = static_cast<u32>(message >> 32); | 17 | const u32 syncpt = static_cast<u32>(message >> 32); |
| 18 | const u32 value = static_cast<u32>(message); | 18 | const u32 value = static_cast<u32>(message); |
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 8dd4a2637..cabe8d418 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -145,7 +145,7 @@ struct KernelCore::Impl { | |||
| 145 | 145 | ||
| 146 | void InitializePreemption(KernelCore& kernel) { | 146 | void InitializePreemption(KernelCore& kernel) { |
| 147 | preemption_event = Core::Timing::CreateEvent( | 147 | preemption_event = Core::Timing::CreateEvent( |
| 148 | "PreemptionCallback", [this, &kernel](u64, std::chrono::nanoseconds) { | 148 | "PreemptionCallback", [this, &kernel](std::uintptr_t, std::chrono::nanoseconds) { |
| 149 | { | 149 | { |
| 150 | SchedulerLock lock(kernel); | 150 | SchedulerLock lock(kernel); |
| 151 | global_scheduler.PreemptThreads(); | 151 | global_scheduler.PreemptThreads(); |
diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp index af22f4c33..7e6391c6c 100644 --- a/src/core/hle/kernel/server_session.cpp +++ b/src/core/hle/kernel/server_session.cpp | |||
| @@ -33,8 +33,10 @@ ResultVal<std::shared_ptr<ServerSession>> ServerSession::Create(KernelCore& kern | |||
| 33 | std::string name) { | 33 | std::string name) { |
| 34 | std::shared_ptr<ServerSession> session{std::make_shared<ServerSession>(kernel)}; | 34 | std::shared_ptr<ServerSession> session{std::make_shared<ServerSession>(kernel)}; |
| 35 | 35 | ||
| 36 | session->request_event = Core::Timing::CreateEvent( | 36 | session->request_event = |
| 37 | name, [session](u64, std::chrono::nanoseconds) { session->CompleteSyncRequest(); }); | 37 | Core::Timing::CreateEvent(name, [session](std::uintptr_t, std::chrono::nanoseconds) { |
| 38 | session->CompleteSyncRequest(); | ||
| 39 | }); | ||
| 38 | session->name = std::move(name); | 40 | session->name = std::move(name); |
| 39 | session->parent = std::move(parent); | 41 | session->parent = std::move(parent); |
| 40 | 42 | ||
diff --git a/src/core/hle/kernel/time_manager.cpp b/src/core/hle/kernel/time_manager.cpp index 88b01b751..95f2446c9 100644 --- a/src/core/hle/kernel/time_manager.cpp +++ b/src/core/hle/kernel/time_manager.cpp | |||
| @@ -16,14 +16,14 @@ namespace Kernel { | |||
| 16 | 16 | ||
| 17 | TimeManager::TimeManager(Core::System& system_) : system{system_} { | 17 | TimeManager::TimeManager(Core::System& system_) : system{system_} { |
| 18 | time_manager_event_type = Core::Timing::CreateEvent( | 18 | time_manager_event_type = Core::Timing::CreateEvent( |
| 19 | "Kernel::TimeManagerCallback", [this](u64 thread_handle, std::chrono::nanoseconds) { | 19 | "Kernel::TimeManagerCallback", |
| 20 | SchedulerLock lock(system.Kernel()); | 20 | [this](std::uintptr_t thread_handle, std::chrono::nanoseconds) { |
| 21 | Handle proper_handle = static_cast<Handle>(thread_handle); | 21 | const SchedulerLock lock(system.Kernel()); |
| 22 | const auto proper_handle = static_cast<Handle>(thread_handle); | ||
| 22 | if (cancelled_events[proper_handle]) { | 23 | if (cancelled_events[proper_handle]) { |
| 23 | return; | 24 | return; |
| 24 | } | 25 | } |
| 25 | std::shared_ptr<Thread> thread = | 26 | auto thread = this->system.Kernel().RetrieveThreadFromGlobalHandleTable(proper_handle); |
| 26 | this->system.Kernel().RetrieveThreadFromGlobalHandleTable(proper_handle); | ||
| 27 | thread->OnWakeUp(); | 27 | thread->OnWakeUp(); |
| 28 | }); | 28 | }); |
| 29 | } | 29 | } |
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 680290cbd..1e95b7580 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -77,8 +77,9 @@ IAppletResource::IAppletResource(Core::System& system) | |||
| 77 | 77 | ||
| 78 | // Register update callbacks | 78 | // Register update callbacks |
| 79 | pad_update_event = Core::Timing::CreateEvent( | 79 | pad_update_event = Core::Timing::CreateEvent( |
| 80 | "HID::UpdatePadCallback", [this](u64 userdata, std::chrono::nanoseconds ns_late) { | 80 | "HID::UpdatePadCallback", |
| 81 | UpdateControllers(userdata, ns_late); | 81 | [this](std::uintptr_t user_data, std::chrono::nanoseconds ns_late) { |
| 82 | UpdateControllers(user_data, ns_late); | ||
| 82 | }); | 83 | }); |
| 83 | 84 | ||
| 84 | // TODO(shinyquagsire23): Other update callbacks? (accel, gyro?) | 85 | // TODO(shinyquagsire23): Other update callbacks? (accel, gyro?) |
| @@ -108,7 +109,8 @@ void IAppletResource::GetSharedMemoryHandle(Kernel::HLERequestContext& ctx) { | |||
| 108 | rb.PushCopyObjects(shared_mem); | 109 | rb.PushCopyObjects(shared_mem); |
| 109 | } | 110 | } |
| 110 | 111 | ||
| 111 | void IAppletResource::UpdateControllers(u64 userdata, std::chrono::nanoseconds ns_late) { | 112 | void IAppletResource::UpdateControllers(std::uintptr_t user_data, |
| 113 | std::chrono::nanoseconds ns_late) { | ||
| 112 | auto& core_timing = system.CoreTiming(); | 114 | auto& core_timing = system.CoreTiming(); |
| 113 | 115 | ||
| 114 | const bool should_reload = Settings::values.is_device_reload_pending.exchange(false); | 116 | const bool should_reload = Settings::values.is_device_reload_pending.exchange(false); |
diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h index c6f0a2584..efb07547f 100644 --- a/src/core/hle/service/hid/hid.h +++ b/src/core/hle/service/hid/hid.h | |||
| @@ -64,7 +64,7 @@ private: | |||
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | void GetSharedMemoryHandle(Kernel::HLERequestContext& ctx); | 66 | void GetSharedMemoryHandle(Kernel::HLERequestContext& ctx); |
| 67 | void UpdateControllers(u64 userdata, std::chrono::nanoseconds ns_late); | 67 | void UpdateControllers(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); |
| 68 | 68 | ||
| 69 | std::shared_ptr<Kernel::SharedMemory> shared_mem; | 69 | std::shared_ptr<Kernel::SharedMemory> shared_mem; |
| 70 | 70 | ||
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index e561bf654..f644a460d 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp | |||
| @@ -67,7 +67,7 @@ NVFlinger::NVFlinger(Core::System& system) : system(system) { | |||
| 67 | 67 | ||
| 68 | // Schedule the screen composition events | 68 | // Schedule the screen composition events |
| 69 | composition_event = Core::Timing::CreateEvent( | 69 | composition_event = Core::Timing::CreateEvent( |
| 70 | "ScreenComposition", [this](u64, std::chrono::nanoseconds ns_late) { | 70 | "ScreenComposition", [this](std::uintptr_t, std::chrono::nanoseconds ns_late) { |
| 71 | const auto guard = Lock(); | 71 | const auto guard = Lock(); |
| 72 | Compose(); | 72 | Compose(); |
| 73 | 73 | ||
diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp index ced41b1fe..eeebdf02e 100644 --- a/src/core/memory/cheat_engine.cpp +++ b/src/core/memory/cheat_engine.cpp | |||
| @@ -188,11 +188,11 @@ CheatEngine::~CheatEngine() { | |||
| 188 | } | 188 | } |
| 189 | 189 | ||
| 190 | void CheatEngine::Initialize() { | 190 | void CheatEngine::Initialize() { |
| 191 | event = Core::Timing::CreateEvent("CheatEngine::FrameCallback::" + | 191 | event = Core::Timing::CreateEvent( |
| 192 | Common::HexToString(metadata.main_nso_build_id), | 192 | "CheatEngine::FrameCallback::" + Common::HexToString(metadata.main_nso_build_id), |
| 193 | [this](u64 userdata, std::chrono::nanoseconds ns_late) { | 193 | [this](std::uintptr_t user_data, std::chrono::nanoseconds ns_late) { |
| 194 | FrameCallback(userdata, ns_late); | 194 | FrameCallback(user_data, ns_late); |
| 195 | }); | 195 | }); |
| 196 | core_timing.ScheduleEvent(CHEAT_ENGINE_NS, event); | 196 | core_timing.ScheduleEvent(CHEAT_ENGINE_NS, event); |
| 197 | 197 | ||
| 198 | metadata.process_id = system.CurrentProcess()->GetProcessID(); | 198 | metadata.process_id = system.CurrentProcess()->GetProcessID(); |
| @@ -219,7 +219,7 @@ void CheatEngine::Reload(std::vector<CheatEntry> cheats) { | |||
| 219 | 219 | ||
| 220 | MICROPROFILE_DEFINE(Cheat_Engine, "Add-Ons", "Cheat Engine", MP_RGB(70, 200, 70)); | 220 | MICROPROFILE_DEFINE(Cheat_Engine, "Add-Ons", "Cheat Engine", MP_RGB(70, 200, 70)); |
| 221 | 221 | ||
| 222 | void CheatEngine::FrameCallback(u64, std::chrono::nanoseconds ns_late) { | 222 | void CheatEngine::FrameCallback(std::uintptr_t, std::chrono::nanoseconds ns_late) { |
| 223 | if (is_pending_reload.exchange(false)) { | 223 | if (is_pending_reload.exchange(false)) { |
| 224 | vm.LoadProgram(cheats); | 224 | vm.LoadProgram(cheats); |
| 225 | } | 225 | } |
diff --git a/src/core/memory/cheat_engine.h b/src/core/memory/cheat_engine.h index d4068cf84..fa039a831 100644 --- a/src/core/memory/cheat_engine.h +++ b/src/core/memory/cheat_engine.h | |||
| @@ -72,7 +72,7 @@ public: | |||
| 72 | void Reload(std::vector<CheatEntry> cheats); | 72 | void Reload(std::vector<CheatEntry> cheats); |
| 73 | 73 | ||
| 74 | private: | 74 | private: |
| 75 | void FrameCallback(u64 userdata, std::chrono::nanoseconds ns_late); | 75 | void FrameCallback(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); |
| 76 | 76 | ||
| 77 | DmntCheatVm vm; | 77 | DmntCheatVm vm; |
| 78 | CheatProcessMetadata metadata; | 78 | CheatProcessMetadata metadata; |
diff --git a/src/core/settings.cpp b/src/core/settings.cpp index 44252dd81..416b2d866 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp | |||
| @@ -173,7 +173,6 @@ void RestoreGlobalState() { | |||
| 173 | values.use_assembly_shaders.SetGlobal(true); | 173 | values.use_assembly_shaders.SetGlobal(true); |
| 174 | values.use_asynchronous_shaders.SetGlobal(true); | 174 | values.use_asynchronous_shaders.SetGlobal(true); |
| 175 | values.use_fast_gpu_time.SetGlobal(true); | 175 | values.use_fast_gpu_time.SetGlobal(true); |
| 176 | values.force_30fps_mode.SetGlobal(true); | ||
| 177 | values.bg_red.SetGlobal(true); | 176 | values.bg_red.SetGlobal(true); |
| 178 | values.bg_green.SetGlobal(true); | 177 | values.bg_green.SetGlobal(true); |
| 179 | values.bg_blue.SetGlobal(true); | 178 | values.bg_blue.SetGlobal(true); |
diff --git a/src/core/settings.h b/src/core/settings.h index 386233fdf..bb145f193 100644 --- a/src/core/settings.h +++ b/src/core/settings.h | |||
| @@ -435,7 +435,6 @@ struct Values { | |||
| 435 | Setting<bool> use_vsync; | 435 | Setting<bool> use_vsync; |
| 436 | Setting<bool> use_assembly_shaders; | 436 | Setting<bool> use_assembly_shaders; |
| 437 | Setting<bool> use_asynchronous_shaders; | 437 | Setting<bool> use_asynchronous_shaders; |
| 438 | Setting<bool> force_30fps_mode; | ||
| 439 | Setting<bool> use_fast_gpu_time; | 438 | Setting<bool> use_fast_gpu_time; |
| 440 | 439 | ||
| 441 | Setting<float> bg_red; | 440 | Setting<float> bg_red; |
diff --git a/src/core/tools/freezer.cpp b/src/core/tools/freezer.cpp index 27b894b51..2003e096f 100644 --- a/src/core/tools/freezer.cpp +++ b/src/core/tools/freezer.cpp | |||
| @@ -55,10 +55,11 @@ void MemoryWriteWidth(Core::Memory::Memory& memory, u32 width, VAddr addr, u64 v | |||
| 55 | 55 | ||
| 56 | Freezer::Freezer(Core::Timing::CoreTiming& core_timing_, Core::Memory::Memory& memory_) | 56 | Freezer::Freezer(Core::Timing::CoreTiming& core_timing_, Core::Memory::Memory& memory_) |
| 57 | : core_timing{core_timing_}, memory{memory_} { | 57 | : core_timing{core_timing_}, memory{memory_} { |
| 58 | event = Core::Timing::CreateEvent("MemoryFreezer::FrameCallback", | 58 | event = Core::Timing::CreateEvent( |
| 59 | [this](u64 userdata, std::chrono::nanoseconds ns_late) { | 59 | "MemoryFreezer::FrameCallback", |
| 60 | FrameCallback(userdata, ns_late); | 60 | [this](std::uintptr_t user_data, std::chrono::nanoseconds ns_late) { |
| 61 | }); | 61 | FrameCallback(user_data, ns_late); |
| 62 | }); | ||
| 62 | core_timing.ScheduleEvent(memory_freezer_ns, event); | 63 | core_timing.ScheduleEvent(memory_freezer_ns, event); |
| 63 | } | 64 | } |
| 64 | 65 | ||
| @@ -159,7 +160,7 @@ std::vector<Freezer::Entry> Freezer::GetEntries() const { | |||
| 159 | return entries; | 160 | return entries; |
| 160 | } | 161 | } |
| 161 | 162 | ||
| 162 | void Freezer::FrameCallback(u64, std::chrono::nanoseconds ns_late) { | 163 | void Freezer::FrameCallback(std::uintptr_t, std::chrono::nanoseconds ns_late) { |
| 163 | if (!IsActive()) { | 164 | if (!IsActive()) { |
| 164 | LOG_DEBUG(Common_Memory, "Memory freezer has been deactivated, ending callback events."); | 165 | LOG_DEBUG(Common_Memory, "Memory freezer has been deactivated, ending callback events."); |
| 165 | return; | 166 | return; |
diff --git a/src/core/tools/freezer.h b/src/core/tools/freezer.h index 8438783d5..2b2326bc4 100644 --- a/src/core/tools/freezer.h +++ b/src/core/tools/freezer.h | |||
| @@ -73,7 +73,7 @@ public: | |||
| 73 | std::vector<Entry> GetEntries() const; | 73 | std::vector<Entry> GetEntries() const; |
| 74 | 74 | ||
| 75 | private: | 75 | private: |
| 76 | void FrameCallback(u64 userdata, std::chrono::nanoseconds ns_late); | 76 | void FrameCallback(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); |
| 77 | void FillEntryReads(); | 77 | void FillEntryReads(); |
| 78 | 78 | ||
| 79 | std::atomic_bool active{false}; | 79 | std::atomic_bool active{false}; |
diff --git a/src/tests/core/core_timing.cpp b/src/tests/core/core_timing.cpp index 244463a47..022b26e6d 100644 --- a/src/tests/core/core_timing.cpp +++ b/src/tests/core/core_timing.cpp | |||
| @@ -25,10 +25,10 @@ std::bitset<CB_IDS.size()> callbacks_ran_flags; | |||
| 25 | u64 expected_callback = 0; | 25 | u64 expected_callback = 0; |
| 26 | 26 | ||
| 27 | template <unsigned int IDX> | 27 | template <unsigned int IDX> |
| 28 | void HostCallbackTemplate(u64 userdata, std::chrono::nanoseconds ns_late) { | 28 | void HostCallbackTemplate(std::uintptr_t user_data, std::chrono::nanoseconds ns_late) { |
| 29 | static_assert(IDX < CB_IDS.size(), "IDX out of range"); | 29 | static_assert(IDX < CB_IDS.size(), "IDX out of range"); |
| 30 | callbacks_ran_flags.set(IDX); | 30 | callbacks_ran_flags.set(IDX); |
| 31 | REQUIRE(CB_IDS[IDX] == userdata); | 31 | REQUIRE(CB_IDS[IDX] == user_data); |
| 32 | REQUIRE(CB_IDS[IDX] == CB_IDS[calls_order[expected_callback]]); | 32 | REQUIRE(CB_IDS[IDX] == CB_IDS[calls_order[expected_callback]]); |
| 33 | delays[IDX] = ns_late.count(); | 33 | delays[IDX] = ns_late.count(); |
| 34 | ++expected_callback; | 34 | ++expected_callback; |
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 59a193edd..94b96afb4 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -666,8 +666,6 @@ void Config::ReadRendererValues() { | |||
| 666 | QStringLiteral("use_asynchronous_shaders"), false); | 666 | QStringLiteral("use_asynchronous_shaders"), false); |
| 667 | ReadSettingGlobal(Settings::values.use_fast_gpu_time, QStringLiteral("use_fast_gpu_time"), | 667 | ReadSettingGlobal(Settings::values.use_fast_gpu_time, QStringLiteral("use_fast_gpu_time"), |
| 668 | true); | 668 | true); |
| 669 | ReadSettingGlobal(Settings::values.force_30fps_mode, QStringLiteral("force_30fps_mode"), false); | ||
| 670 | |||
| 671 | ReadSettingGlobal(Settings::values.bg_red, QStringLiteral("bg_red"), 0.0); | 669 | ReadSettingGlobal(Settings::values.bg_red, QStringLiteral("bg_red"), 0.0); |
| 672 | ReadSettingGlobal(Settings::values.bg_green, QStringLiteral("bg_green"), 0.0); | 670 | ReadSettingGlobal(Settings::values.bg_green, QStringLiteral("bg_green"), 0.0); |
| 673 | ReadSettingGlobal(Settings::values.bg_blue, QStringLiteral("bg_blue"), 0.0); | 671 | ReadSettingGlobal(Settings::values.bg_blue, QStringLiteral("bg_blue"), 0.0); |
| @@ -1153,9 +1151,6 @@ void Config::SaveRendererValues() { | |||
| 1153 | Settings::values.use_asynchronous_shaders, false); | 1151 | Settings::values.use_asynchronous_shaders, false); |
| 1154 | WriteSettingGlobal(QStringLiteral("use_fast_gpu_time"), Settings::values.use_fast_gpu_time, | 1152 | WriteSettingGlobal(QStringLiteral("use_fast_gpu_time"), Settings::values.use_fast_gpu_time, |
| 1155 | true); | 1153 | true); |
| 1156 | WriteSettingGlobal(QStringLiteral("force_30fps_mode"), Settings::values.force_30fps_mode, | ||
| 1157 | false); | ||
| 1158 | |||
| 1159 | // Cast to double because Qt's written float values are not human-readable | 1154 | // Cast to double because Qt's written float values are not human-readable |
| 1160 | WriteSettingGlobal(QStringLiteral("bg_red"), Settings::values.bg_red, 0.0); | 1155 | WriteSettingGlobal(QStringLiteral("bg_red"), Settings::values.bg_red, 0.0); |
| 1161 | WriteSettingGlobal(QStringLiteral("bg_green"), Settings::values.bg_green, 0.0); | 1156 | WriteSettingGlobal(QStringLiteral("bg_green"), Settings::values.bg_green, 0.0); |
diff --git a/src/yuzu/configuration/configure_graphics_advanced.cpp b/src/yuzu/configuration/configure_graphics_advanced.cpp index 8b9180811..c5d1a778c 100644 --- a/src/yuzu/configuration/configure_graphics_advanced.cpp +++ b/src/yuzu/configuration/configure_graphics_advanced.cpp | |||
| @@ -25,14 +25,12 @@ void ConfigureGraphicsAdvanced::SetConfiguration() { | |||
| 25 | ui->use_vsync->setEnabled(runtime_lock); | 25 | ui->use_vsync->setEnabled(runtime_lock); |
| 26 | ui->use_assembly_shaders->setEnabled(runtime_lock); | 26 | ui->use_assembly_shaders->setEnabled(runtime_lock); |
| 27 | ui->use_asynchronous_shaders->setEnabled(runtime_lock); | 27 | ui->use_asynchronous_shaders->setEnabled(runtime_lock); |
| 28 | ui->force_30fps_mode->setEnabled(runtime_lock); | ||
| 29 | ui->anisotropic_filtering_combobox->setEnabled(runtime_lock); | 28 | ui->anisotropic_filtering_combobox->setEnabled(runtime_lock); |
| 30 | 29 | ||
| 31 | ui->use_vsync->setChecked(Settings::values.use_vsync.GetValue()); | 30 | ui->use_vsync->setChecked(Settings::values.use_vsync.GetValue()); |
| 32 | ui->use_assembly_shaders->setChecked(Settings::values.use_assembly_shaders.GetValue()); | 31 | ui->use_assembly_shaders->setChecked(Settings::values.use_assembly_shaders.GetValue()); |
| 33 | ui->use_asynchronous_shaders->setChecked(Settings::values.use_asynchronous_shaders.GetValue()); | 32 | ui->use_asynchronous_shaders->setChecked(Settings::values.use_asynchronous_shaders.GetValue()); |
| 34 | ui->use_fast_gpu_time->setChecked(Settings::values.use_fast_gpu_time.GetValue()); | 33 | ui->use_fast_gpu_time->setChecked(Settings::values.use_fast_gpu_time.GetValue()); |
| 35 | ui->force_30fps_mode->setChecked(Settings::values.force_30fps_mode.GetValue()); | ||
| 36 | 34 | ||
| 37 | if (Settings::configuring_global) { | 35 | if (Settings::configuring_global) { |
| 38 | ui->gpu_accuracy->setCurrentIndex( | 36 | ui->gpu_accuracy->setCurrentIndex( |
| @@ -78,9 +76,6 @@ void ConfigureGraphicsAdvanced::ApplyConfiguration() { | |||
| 78 | if (Settings::values.use_fast_gpu_time.UsingGlobal()) { | 76 | if (Settings::values.use_fast_gpu_time.UsingGlobal()) { |
| 79 | Settings::values.use_fast_gpu_time.SetValue(ui->use_fast_gpu_time->isChecked()); | 77 | Settings::values.use_fast_gpu_time.SetValue(ui->use_fast_gpu_time->isChecked()); |
| 80 | } | 78 | } |
| 81 | if (Settings::values.force_30fps_mode.UsingGlobal()) { | ||
| 82 | Settings::values.force_30fps_mode.SetValue(ui->force_30fps_mode->isChecked()); | ||
| 83 | } | ||
| 84 | if (Settings::values.max_anisotropy.UsingGlobal()) { | 79 | if (Settings::values.max_anisotropy.UsingGlobal()) { |
| 85 | Settings::values.max_anisotropy.SetValue( | 80 | Settings::values.max_anisotropy.SetValue( |
| 86 | ui->anisotropic_filtering_combobox->currentIndex()); | 81 | ui->anisotropic_filtering_combobox->currentIndex()); |
| @@ -97,8 +92,6 @@ void ConfigureGraphicsAdvanced::ApplyConfiguration() { | |||
| 97 | use_asynchronous_shaders); | 92 | use_asynchronous_shaders); |
| 98 | ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_fast_gpu_time, | 93 | ConfigurationShared::ApplyPerGameSetting(&Settings::values.use_fast_gpu_time, |
| 99 | ui->use_fast_gpu_time, use_fast_gpu_time); | 94 | ui->use_fast_gpu_time, use_fast_gpu_time); |
| 100 | ConfigurationShared::ApplyPerGameSetting(&Settings::values.force_30fps_mode, | ||
| 101 | ui->force_30fps_mode, force_30fps_mode); | ||
| 102 | ConfigurationShared::ApplyPerGameSetting(&Settings::values.max_anisotropy, | 95 | ConfigurationShared::ApplyPerGameSetting(&Settings::values.max_anisotropy, |
| 103 | ui->anisotropic_filtering_combobox); | 96 | ui->anisotropic_filtering_combobox); |
| 104 | 97 | ||
| @@ -132,7 +125,6 @@ void ConfigureGraphicsAdvanced::SetupPerGameUI() { | |||
| 132 | ui->use_asynchronous_shaders->setEnabled( | 125 | ui->use_asynchronous_shaders->setEnabled( |
| 133 | Settings::values.use_asynchronous_shaders.UsingGlobal()); | 126 | Settings::values.use_asynchronous_shaders.UsingGlobal()); |
| 134 | ui->use_fast_gpu_time->setEnabled(Settings::values.use_fast_gpu_time.UsingGlobal()); | 127 | ui->use_fast_gpu_time->setEnabled(Settings::values.use_fast_gpu_time.UsingGlobal()); |
| 135 | ui->force_30fps_mode->setEnabled(Settings::values.force_30fps_mode.UsingGlobal()); | ||
| 136 | ui->anisotropic_filtering_combobox->setEnabled( | 128 | ui->anisotropic_filtering_combobox->setEnabled( |
| 137 | Settings::values.max_anisotropy.UsingGlobal()); | 129 | Settings::values.max_anisotropy.UsingGlobal()); |
| 138 | 130 | ||
| @@ -149,8 +141,6 @@ void ConfigureGraphicsAdvanced::SetupPerGameUI() { | |||
| 149 | Settings::values.use_asynchronous_shaders, use_asynchronous_shaders); | 141 | Settings::values.use_asynchronous_shaders, use_asynchronous_shaders); |
| 150 | ConfigurationShared::SetColoredTristate(ui->use_fast_gpu_time, "use_fast_gpu_time", | 142 | ConfigurationShared::SetColoredTristate(ui->use_fast_gpu_time, "use_fast_gpu_time", |
| 151 | Settings::values.use_fast_gpu_time, use_fast_gpu_time); | 143 | Settings::values.use_fast_gpu_time, use_fast_gpu_time); |
| 152 | ConfigurationShared::SetColoredTristate(ui->force_30fps_mode, "force_30fps_mode", | ||
| 153 | Settings::values.force_30fps_mode, force_30fps_mode); | ||
| 154 | ConfigurationShared::SetColoredComboBox( | 144 | ConfigurationShared::SetColoredComboBox( |
| 155 | ui->gpu_accuracy, ui->label_gpu_accuracy, "label_gpu_accuracy", | 145 | ui->gpu_accuracy, ui->label_gpu_accuracy, "label_gpu_accuracy", |
| 156 | static_cast<int>(Settings::values.gpu_accuracy.GetValue(true))); | 146 | static_cast<int>(Settings::values.gpu_accuracy.GetValue(true))); |
diff --git a/src/yuzu/configuration/configure_graphics_advanced.h b/src/yuzu/configuration/configure_graphics_advanced.h index 3c4f6f7bb..e61b571c7 100644 --- a/src/yuzu/configuration/configure_graphics_advanced.h +++ b/src/yuzu/configuration/configure_graphics_advanced.h | |||
| @@ -38,5 +38,4 @@ private: | |||
| 38 | ConfigurationShared::CheckState use_assembly_shaders; | 38 | ConfigurationShared::CheckState use_assembly_shaders; |
| 39 | ConfigurationShared::CheckState use_asynchronous_shaders; | 39 | ConfigurationShared::CheckState use_asynchronous_shaders; |
| 40 | ConfigurationShared::CheckState use_fast_gpu_time; | 40 | ConfigurationShared::CheckState use_fast_gpu_time; |
| 41 | ConfigurationShared::CheckState force_30fps_mode; | ||
| 42 | }; | 41 | }; |
diff --git a/src/yuzu/configuration/configure_graphics_advanced.ui b/src/yuzu/configuration/configure_graphics_advanced.ui index 6a0d29c27..a793c803d 100644 --- a/src/yuzu/configuration/configure_graphics_advanced.ui +++ b/src/yuzu/configuration/configure_graphics_advanced.ui | |||
| @@ -97,13 +97,6 @@ | |||
| 97 | </widget> | 97 | </widget> |
| 98 | </item> | 98 | </item> |
| 99 | <item> | 99 | <item> |
| 100 | <widget class="QCheckBox" name="force_30fps_mode"> | ||
| 101 | <property name="text"> | ||
| 102 | <string>Force 30 FPS mode</string> | ||
| 103 | </property> | ||
| 104 | </widget> | ||
| 105 | </item> | ||
| 106 | <item> | ||
| 107 | <widget class="QCheckBox" name="use_fast_gpu_time"> | 100 | <widget class="QCheckBox" name="use_fast_gpu_time"> |
| 108 | <property name="text"> | 101 | <property name="text"> |
| 109 | <string>Use Fast GPU Time</string> | 102 | <string>Use Fast GPU Time</string> |