early-access version 3009
This commit is contained in:
parent
af759807a1
commit
9dae005605
@ -1,7 +1,7 @@
|
|||||||
yuzu emulator early access
|
yuzu emulator early access
|
||||||
=============
|
=============
|
||||||
|
|
||||||
This is the source code for early-access 3008.
|
This is the source code for early-access 3009.
|
||||||
|
|
||||||
## Legal Notice
|
## Legal Notice
|
||||||
|
|
||||||
|
@ -270,6 +270,7 @@ void CoreTiming::ThreadLoop() {
|
|||||||
// There are more events left in the queue, wait until the next event.
|
// There are more events left in the queue, wait until the next event.
|
||||||
const auto wait_time = *next_time - GetGlobalTimeNs().count();
|
const auto wait_time = *next_time - GetGlobalTimeNs().count();
|
||||||
if (wait_time > 0) {
|
if (wait_time > 0) {
|
||||||
|
#ifdef _WIN32
|
||||||
// Assume a timer resolution of 1ms.
|
// Assume a timer resolution of 1ms.
|
||||||
static constexpr s64 TimerResolutionNS = 1000000;
|
static constexpr s64 TimerResolutionNS = 1000000;
|
||||||
|
|
||||||
@ -287,6 +288,9 @@ void CoreTiming::ThreadLoop() {
|
|||||||
if (event.IsSet()) {
|
if (event.IsSet()) {
|
||||||
event.Reset();
|
event.Reset();
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
event.WaitFor(std::chrono::nanoseconds(wait_time));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Queue is empty, wait until another event is scheduled and signals us to continue.
|
// Queue is empty, wait until another event is scheduled and signals us to continue.
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
// SPDX-FileCopyrightText: 2015 Citra Emulator Project
|
// SPDX-FileCopyrightText: 2015 Citra Emulator Project
|
||||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||||
|
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "core/frontend/emu_window.h"
|
#include "core/frontend/emu_window.h"
|
||||||
#include "video_core/renderer_base.h"
|
#include "video_core/renderer_base.h"
|
||||||
@ -35,8 +37,12 @@ void RendererBase::RequestScreenshot(void* data, std::function<void(bool)> callb
|
|||||||
LOG_ERROR(Render, "A screenshot is already requested or in progress, ignoring the request");
|
LOG_ERROR(Render, "A screenshot is already requested or in progress, ignoring the request");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
auto async_callback{[callback = std::move(callback)](bool invert_y) {
|
||||||
|
std::thread t{callback, invert_y};
|
||||||
|
t.detach();
|
||||||
|
}};
|
||||||
renderer_settings.screenshot_bits = data;
|
renderer_settings.screenshot_bits = data;
|
||||||
renderer_settings.screenshot_complete_callback = std::move(callback);
|
renderer_settings.screenshot_complete_callback = async_callback;
|
||||||
renderer_settings.screenshot_framebuffer_layout = layout;
|
renderer_settings.screenshot_framebuffer_layout = layout;
|
||||||
renderer_settings.screenshot_requested = true;
|
renderer_settings.screenshot_requested = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user