mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-21 22:54:16 +01:00
[wsi] Add init/quit functions, integrate them into DxvkInstance.
This is preparation for loading/unloading WSI backends at runtime, which will be in an upcoming commit.
This commit is contained in:
parent
7bad17c1d1
commit
4055a92856
@ -4,6 +4,7 @@
|
|||||||
#include "dxvk_openvr.h"
|
#include "dxvk_openvr.h"
|
||||||
#include "dxvk_openxr.h"
|
#include "dxvk_openxr.h"
|
||||||
#include "dxvk_platform_exts.h"
|
#include "dxvk_platform_exts.h"
|
||||||
|
#include "../wsi/wsi_platform.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -20,6 +21,8 @@ namespace dxvk {
|
|||||||
Logger::info(str::format("Game: ", env::getExeName()));
|
Logger::info(str::format("Game: ", env::getExeName()));
|
||||||
Logger::info(str::format("DXVK: ", DXVK_VERSION));
|
Logger::info(str::format("DXVK: ", DXVK_VERSION));
|
||||||
|
|
||||||
|
wsi::init();
|
||||||
|
|
||||||
m_config = Config::getUserConfig();
|
m_config = Config::getUserConfig();
|
||||||
m_config.merge(Config::getAppConfig(env::getExePath()));
|
m_config.merge(Config::getAppConfig(env::getExePath()));
|
||||||
m_config.logOptions();
|
m_config.logOptions();
|
||||||
@ -64,6 +67,8 @@ namespace dxvk {
|
|||||||
DxvkInstance::~DxvkInstance() {
|
DxvkInstance::~DxvkInstance() {
|
||||||
if (m_messenger)
|
if (m_messenger)
|
||||||
m_vki->vkDestroyDebugUtilsMessengerEXT(m_vki->instance(), m_messenger, nullptr);
|
m_vki->vkDestroyDebugUtilsMessengerEXT(m_vki->instance(), m_messenger, nullptr);
|
||||||
|
|
||||||
|
wsi::quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
wsi_common_src = [
|
wsi_common_src = [
|
||||||
'wsi_edid.cpp',
|
'wsi_edid.cpp',
|
||||||
|
'wsi_platform.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
wsi_win32_src = [
|
wsi_win32_src = [
|
||||||
|
11
src/wsi/wsi_platform.cpp
Normal file
11
src/wsi/wsi_platform.cpp
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "wsi_platform.h"
|
||||||
|
|
||||||
|
namespace dxvk::wsi {
|
||||||
|
|
||||||
|
void init() {
|
||||||
|
}
|
||||||
|
|
||||||
|
void quit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -7,3 +7,10 @@
|
|||||||
#elif defined(DXVK_WSI_GLFW)
|
#elif defined(DXVK_WSI_GLFW)
|
||||||
#include "glfw/wsi_platform_glfw.h"
|
#include "glfw/wsi_platform_glfw.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
namespace dxvk::wsi {
|
||||||
|
|
||||||
|
void init();
|
||||||
|
void quit();
|
||||||
|
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user