mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-11 14:24:20 +00:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ea461cbd67 |
@@ -28,10 +28,18 @@ namespace {
|
||||
//
|
||||
// Keep in sync with cubeb_sink.cpp name.
|
||||
SDL_SetHint("SDL_AUDIO_DEVICE_APP_NAME", "yuzu Latency Getter");
|
||||
#ifdef __ANDROID__
|
||||
SDL_SetHintWithPriority(SDL_HINT_AUDIO_DRIVER, "openslES", SDL_HINT_OVERRIDE);
|
||||
if (!SDL_InitSubSystem(SDL_INIT_AUDIO)) {
|
||||
LOG_WARNING(Audio_Sink, "OpenSL ES audio initialization failed: {}; retrying default drivers", SDL_GetError());
|
||||
SDL_ResetHint(SDL_HINT_AUDIO_DRIVER);
|
||||
}
|
||||
#endif
|
||||
if (!SDL_WasInit(SDL_INIT_AUDIO) && !SDL_InitSubSystem(SDL_INIT_AUDIO)) {
|
||||
LOG_CRITICAL(Audio_Sink, "SDL_InitSubSystem audio failed: {}", SDL_GetError());
|
||||
return false;
|
||||
}
|
||||
LOG_INFO(Audio_Sink, "SDL audio driver: {}", SDL_GetCurrentAudioDriver());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -55,8 +55,8 @@ constexpr u64 GpuClockMultiplier(Settings::GpuClock clock) {
|
||||
|
||||
struct GPU::Impl {
|
||||
explicit Impl(Core::System& system_, bool is_async_, bool use_nvdec_)
|
||||
: system{system_}
|
||||
, gpu_thread{system_}
|
||||
: gpu_thread{system_}
|
||||
, system{system_}
|
||||
, use_nvdec{use_nvdec_}
|
||||
, shader_notify()
|
||||
, is_async{is_async_}
|
||||
@@ -182,7 +182,6 @@ struct GPU::Impl {
|
||||
}
|
||||
|
||||
void NotifyShutdown() {
|
||||
gpu_thread.NotifyShutdown();
|
||||
std::unique_lock lk{sync_mutex};
|
||||
shutting_down.store(true, std::memory_order::relaxed);
|
||||
sync_cv.notify_all();
|
||||
@@ -302,12 +301,12 @@ struct GPU::Impl {
|
||||
return out;
|
||||
}
|
||||
|
||||
Core::System& system;
|
||||
|
||||
// Destruction of thread must be done before all (non trivial)
|
||||
// previous members has been destroyed
|
||||
VideoCommon::GPUThread::ThreadManager gpu_thread;
|
||||
|
||||
Core::System& system;
|
||||
|
||||
std::unique_ptr<VideoCore::RendererBase> renderer;
|
||||
const bool use_nvdec;
|
||||
|
||||
|
||||
@@ -114,11 +114,4 @@ u64 ThreadManager::PushCommand(CommandData&& command_data, bool block, bool is_a
|
||||
return fence;
|
||||
}
|
||||
|
||||
void ThreadManager::NotifyShutdown() {
|
||||
if (thread.joinable()) {
|
||||
thread.request_stop();
|
||||
thread.join();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace VideoCommon::GPUThread
|
||||
|
||||
@@ -125,8 +125,6 @@ public:
|
||||
|
||||
void TickGPU(bool is_async);
|
||||
|
||||
void NotifyShutdown();
|
||||
|
||||
private:
|
||||
/// Pushes a command to be executed by the GPU thread
|
||||
u64 PushCommand(CommandData&& command_data, bool block, bool is_async);
|
||||
|
||||
Reference in New Issue
Block a user