early-access version 2715

This commit is contained in:
pineappleEA 2022-05-02 09:19:24 +02:00
parent 330b0759e9
commit b011f0fb52
5 changed files with 25 additions and 10 deletions

View File

@ -1,7 +1,7 @@
yuzu emulator early access yuzu emulator early access
============= =============
This is the source code for early-access 2714. This is the source code for early-access 2715.
## Legal Notice ## Legal Notice

View File

@ -86,6 +86,7 @@ static void VolumeAdjustSamples(std::vector<s16>& samples, float game_volume) {
} }
void Stream::PlayNextBuffer(std::chrono::nanoseconds ns_late) { void Stream::PlayNextBuffer(std::chrono::nanoseconds ns_late) {
#ifndef _WIN32
auto now = std::chrono::steady_clock::now(); auto now = std::chrono::steady_clock::now();
auto duration = now.time_since_epoch(); auto duration = now.time_since_epoch();
auto nanoseconds = std::chrono::duration_cast<std::chrono::nanoseconds>(duration); auto nanoseconds = std::chrono::duration_cast<std::chrono::nanoseconds>(duration);
@ -93,6 +94,7 @@ void Stream::PlayNextBuffer(std::chrono::nanoseconds ns_late) {
if (nanoseconds > expected_cb_time) { if (nanoseconds > expected_cb_time) {
ns_late = nanoseconds - expected_cb_time; ns_late = nanoseconds - expected_cb_time;
} }
#endif
if (!IsPlaying()) { if (!IsPlaying()) {
// Ensure we are in playing state before playing the next buffer // 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 = {}; ns_late = {};
} }
#ifndef _WIN32
expected_cb_time = nanoseconds + (buffer_release_ns - ns_late); expected_cb_time = nanoseconds + (buffer_release_ns - ns_late);
#endif
core_timing.ScheduleEvent(buffer_release_ns - ns_late, release_event, {}); core_timing.ScheduleEvent(buffer_release_ns - ns_late, release_event, {});
} }

View File

@ -123,7 +123,9 @@ private:
SinkStream& sink_stream; ///< Output sink for the stream SinkStream& sink_stream; ///< Output sink for the stream
Core::Timing::CoreTiming& core_timing; ///< Core timing instance. Core::Timing::CoreTiming& core_timing; ///< Core timing instance.
std::string name; ///< Name of the stream, must be unique std::string name; ///< Name of the stream, must be unique
#ifndef _WIN32
std::chrono::nanoseconds expected_cb_time = {}; ///< Estimated time of next callback std::chrono::nanoseconds expected_cb_time = {}; ///< Estimated time of next callback
#endif
}; };
using StreamPtr = std::shared_ptr<Stream>; using StreamPtr = std::shared_ptr<Stream>;

View File

@ -26,7 +26,15 @@ void ConfigureNetwork::ApplyConfiguration() {
Settings::values.network_interface = ui->network_interface->currentText().toStdString(); 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); ui->retranslateUi(this);
} }

View File

@ -18,9 +18,10 @@ public:
~ConfigureNetwork() override; ~ConfigureNetwork() override;
void ApplyConfiguration(); void ApplyConfiguration();
void RetranslateUi();
private: private:
void changeEvent(QEvent*) override;
void RetranslateUI();
void SetConfiguration(); void SetConfiguration();
std::unique_ptr<Ui::ConfigureNetwork> ui; std::unique_ptr<Ui::ConfigureNetwork> ui;