mirror of
https://github.com/citra-emu/citra.git
synced 2025-01-06 04:40:06 +00:00
ffc95eb59b
* citra_qt: Check if renderer is null * core: Fix dynarmic use-after-free error * bootmanager: Add current context check in DoneCurrent * Loading a save state would destroy the frame dumper class, which contains a shared context. That context would call DoneCurrent without checking if it was actually bound or not, resulting in crashes when calling opengl functions * externals: Correct glad readme * common: Log renderer debug setting * citra: Make lambda lower case * Consistency with review comments on the PR * video_core: Kill more global state * GetResolutionScaleFactor would be called somewhere in the renderer constructor chain but it relies on the yet unitialized g_renderer, resulting in crashes when the resolution scale is set to auto. Rather than adding a workaround, let's kill this global state to fix this for good
54 lines
1.2 KiB
C++
54 lines
1.2 KiB
C++
// Copyright 2014 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <atomic>
|
|
#include <functional>
|
|
#include <iostream>
|
|
#include <memory>
|
|
#include "core/frontend/emu_window.h"
|
|
|
|
namespace Frontend {
|
|
class EmuWindow;
|
|
}
|
|
|
|
namespace Core {
|
|
class System;
|
|
}
|
|
|
|
namespace Memory {
|
|
class MemorySystem;
|
|
}
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
// Video Core namespace
|
|
|
|
namespace VideoCore {
|
|
|
|
class RendererBase;
|
|
|
|
extern std::unique_ptr<RendererBase> g_renderer; ///< Renderer plugin
|
|
|
|
// TODO: Wrap these in a user settings struct along with any other graphics settings (often set from
|
|
// qt ui)
|
|
extern std::atomic<bool> g_shader_jit_enabled;
|
|
extern std::atomic<bool> g_hw_shader_enabled;
|
|
extern std::atomic<bool> g_separable_shader_enabled;
|
|
extern std::atomic<bool> g_hw_shader_accurate_mul;
|
|
|
|
extern Memory::MemorySystem* g_memory;
|
|
|
|
/// Initialize the video core
|
|
void Init(Frontend::EmuWindow& emu_window, Frontend::EmuWindow* secondary_window,
|
|
Core::System& system);
|
|
|
|
/// Shutdown the video core
|
|
void Shutdown();
|
|
|
|
template <class Archive>
|
|
void serialize(Archive& ar, const unsigned int file_version);
|
|
|
|
} // namespace VideoCore
|