From b011f0fb52244eff6684b6d5a6830805186078bb Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Mon, 2 May 2022 09:19:24 +0200 Subject: [PATCH] early-access version 2715 --- README.md | 2 +- src/audio_core/stream.cpp | 4 ++++ src/audio_core/stream.h | 16 +++++++++------- src/yuzu/configuration/configure_network.cpp | 10 +++++++++- src/yuzu/configuration/configure_network.h | 3 ++- 5 files changed, 25 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 12afd1ecf..1a4c48269 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2714. +This is the source code for early-access 2715. ## Legal Notice diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp index 8ebae617b..8d7a82dc9 100755 --- a/src/audio_core/stream.cpp +++ b/src/audio_core/stream.cpp @@ -86,6 +86,7 @@ static void VolumeAdjustSamples(std::vector& samples, float game_volume) { } void Stream::PlayNextBuffer(std::chrono::nanoseconds ns_late) { +#ifndef _WIN32 auto now = std::chrono::steady_clock::now(); auto duration = now.time_since_epoch(); auto nanoseconds = std::chrono::duration_cast(duration); @@ -93,6 +94,7 @@ void Stream::PlayNextBuffer(std::chrono::nanoseconds ns_late) { if (nanoseconds > expected_cb_time) { ns_late = nanoseconds - expected_cb_time; } +#endif if (!IsPlaying()) { // Ensure we are in playing state before playing the next buffer @@ -128,7 +130,9 @@ void Stream::PlayNextBuffer(std::chrono::nanoseconds ns_late) { ns_late = {}; } +#ifndef _WIN32 expected_cb_time = nanoseconds + (buffer_release_ns - ns_late); +#endif core_timing.ScheduleEvent(buffer_release_ns - ns_late, release_event, {}); } diff --git a/src/audio_core/stream.h b/src/audio_core/stream.h index faec8043c..fdf7ad6ca 100755 --- a/src/audio_core/stream.h +++ b/src/audio_core/stream.h @@ -116,14 +116,16 @@ private: ReleaseCallback release_callback; ///< Buffer release callback for the stream State state{State::Stopped}; ///< Playback state of the stream std::shared_ptr - release_event; ///< Core timing release event for the stream - BufferPtr active_buffer; ///< Actively playing buffer in the stream - std::queue queued_buffers; ///< Buffers queued to be played in the stream - std::queue released_buffers; ///< Buffers recently released from the stream - SinkStream& sink_stream; ///< Output sink for the stream - Core::Timing::CoreTiming& core_timing; ///< Core timing instance. - std::string name; ///< Name of the stream, must be unique + release_event; ///< Core timing release event for the stream + BufferPtr active_buffer; ///< Actively playing buffer in the stream + std::queue queued_buffers; ///< Buffers queued to be played in the stream + std::queue released_buffers; ///< Buffers recently released from the stream + SinkStream& sink_stream; ///< Output sink for the stream + Core::Timing::CoreTiming& core_timing; ///< Core timing instance. + std::string name; ///< Name of the stream, must be unique +#ifndef _WIN32 std::chrono::nanoseconds expected_cb_time = {}; ///< Estimated time of next callback +#endif }; using StreamPtr = std::shared_ptr; diff --git a/src/yuzu/configuration/configure_network.cpp b/src/yuzu/configuration/configure_network.cpp index f87d3d53a..8ed08fa6a 100755 --- a/src/yuzu/configuration/configure_network.cpp +++ b/src/yuzu/configuration/configure_network.cpp @@ -26,7 +26,15 @@ void ConfigureNetwork::ApplyConfiguration() { Settings::values.network_interface = ui->network_interface->currentText().toStdString(); } -void ConfigureNetwork::RetranslateUi() { +void ConfigureNetwork::changeEvent(QEvent* event) { + if (event->type() == QEvent::LanguageChange) { + RetranslateUI(); + } + + QWidget::changeEvent(event); +} + +void ConfigureNetwork::RetranslateUI() { ui->retranslateUi(this); } diff --git a/src/yuzu/configuration/configure_network.h b/src/yuzu/configuration/configure_network.h index e8245cfdc..f666edbd1 100755 --- a/src/yuzu/configuration/configure_network.h +++ b/src/yuzu/configuration/configure_network.h @@ -18,9 +18,10 @@ public: ~ConfigureNetwork() override; void ApplyConfiguration(); - void RetranslateUi(); private: + void changeEvent(QEvent*) override; + void RetranslateUI(); void SetConfiguration(); std::unique_ptr ui;