shadPS4/src/emulator.h

46 lines
1.2 KiB
C
Raw Normal View History

2023-08-09 07:31:18 +00:00
#pragma once
2023-09-12 16:39:08 +00:00
#include <Core/PS4/HLE/Graphics/graphics_ctx.h>
#include <Lib/Threads.h>
#include <SDL.h>
2023-09-18 11:52:16 +00:00
#include <vector>
2023-08-09 07:31:18 +00:00
namespace Emulator {
2023-09-18 11:52:16 +00:00
struct VulkanExt {
bool enable_validation_layers = false;
std::vector<const char*> required_extensions;
std::vector<VkExtensionProperties> available_extensions;
std::vector<const char*> required_layers;
std::vector<VkLayerProperties> available_layers;
};
struct VulkanSurfaceCapabilities {};
struct VulkanQueues {};
2023-09-12 16:39:08 +00:00
struct WindowCtx {
HLE::Libs::Graphics::GraphicCtx m_graphic_ctx;
Lib::Mutex m_mutex;
bool m_is_graphic_initialized = false;
Lib::ConditionVariable m_graphic_initialized_cond;
SDL_Window* m_window = nullptr;
bool is_window_hidden = true;
2023-09-17 20:38:16 +00:00
VkSurfaceKHR m_surface = nullptr;
2023-09-18 11:52:16 +00:00
VulkanSurfaceCapabilities* m_surface_capabilities = nullptr;
2023-09-12 16:39:08 +00:00
};
2023-09-14 13:49:47 +00:00
struct EmuPrivate {
EmuPrivate() = default;
Lib::Mutex m_mutex;
HLE::Libs::Graphics::GraphicCtx* m_graphic_ctx = nullptr;
void* data1 = nullptr;
void* data2 = nullptr;
u32 m_screen_width = {0};
u32 m_screen_height = {0};
};
2023-09-12 16:39:08 +00:00
void emuInit(u32 width, u32 height);
2023-08-09 07:31:18 +00:00
void emuRun();
2023-09-15 21:03:11 +00:00
void checkAndWaitForGraphicsInit();
2023-09-12 16:39:08 +00:00
} // namespace Emulator