mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-20 08:52:22 +01:00
wsi: Pass window state to setWindowMode
This commit is contained in:
parent
5ad84563dd
commit
0259f55285
@ -1331,7 +1331,7 @@ namespace dxvk {
|
||||
|
||||
HMONITOR monitor = wsi::getDefaultMonitor();
|
||||
|
||||
if (!wsi::setWindowMode(monitor, m_window, wsiMode))
|
||||
if (!wsi::setWindowMode(monitor, m_window, &m_windowState, wsiMode))
|
||||
return D3DERR_NOTAVAILABLE;
|
||||
|
||||
if (wsi::getCurrentDisplayMode(monitor, &wsiMode))
|
||||
|
@ -813,7 +813,7 @@ namespace dxvk {
|
||||
if (!selectedMode.RefreshRate.Denominator)
|
||||
selectedMode.RefreshRate.Denominator = 1;
|
||||
|
||||
if (!wsi::setWindowMode(outputDesc.Monitor, m_window, ConvertDisplayMode(selectedMode)))
|
||||
if (!wsi::setWindowMode(outputDesc.Monitor, m_window, &m_windowState, ConvertDisplayMode(selectedMode)))
|
||||
return DXGI_ERROR_NOT_CURRENTLY_AVAILABLE;
|
||||
|
||||
DXGI_VK_MONITOR_DATA* monitorData = nullptr;
|
||||
|
@ -75,6 +75,7 @@ namespace dxvk::wsi {
|
||||
virtual bool setWindowMode(
|
||||
HMONITOR hMonitor,
|
||||
HWND hWindow,
|
||||
DxvkWindowState* pState,
|
||||
const WsiMode& mode);
|
||||
|
||||
virtual bool enterFullscreenMode(
|
||||
|
@ -45,6 +45,7 @@ namespace dxvk::wsi {
|
||||
bool GlfwWsiDriver::setWindowMode(
|
||||
HMONITOR hMonitor,
|
||||
HWND hWindow,
|
||||
DxvkWindowState* pState,
|
||||
const WsiMode& pMode) {
|
||||
const int32_t displayId = fromHmonitor(hMonitor);
|
||||
GLFWwindow* window = fromHwnd(hWindow);
|
||||
|
@ -73,6 +73,7 @@ namespace dxvk::wsi {
|
||||
virtual bool setWindowMode(
|
||||
HMONITOR hMonitor,
|
||||
HWND hWindow,
|
||||
DxvkWindowState* pState,
|
||||
const WsiMode& mode);
|
||||
|
||||
virtual bool enterFullscreenMode(
|
||||
|
@ -44,6 +44,7 @@ namespace dxvk::wsi {
|
||||
bool Sdl2WsiDriver::setWindowMode(
|
||||
HMONITOR hMonitor,
|
||||
HWND hWindow,
|
||||
DxvkWindowState* pState,
|
||||
const WsiMode& pMode) {
|
||||
const int32_t displayId = fromHmonitor(hMonitor);
|
||||
SDL_Window* window = fromHwnd(hWindow);
|
||||
|
@ -60,6 +60,7 @@ namespace dxvk::wsi {
|
||||
virtual bool setWindowMode(
|
||||
HMONITOR hMonitor,
|
||||
HWND hWindow,
|
||||
DxvkWindowState* pState,
|
||||
const WsiMode& mode);
|
||||
|
||||
virtual bool enterFullscreenMode(
|
||||
|
@ -134,6 +134,7 @@ namespace dxvk::wsi {
|
||||
bool Win32WsiDriver::setWindowMode(
|
||||
HMONITOR hMonitor,
|
||||
HWND hWindow,
|
||||
DxvkWindowState* pState,
|
||||
const WsiMode& mode) {
|
||||
::MONITORINFOEXW monInfo;
|
||||
monInfo.cbSize = sizeof(monInfo);
|
||||
|
@ -80,8 +80,9 @@ namespace dxvk::wsi {
|
||||
bool setWindowMode(
|
||||
HMONITOR hMonitor,
|
||||
HWND hWindow,
|
||||
DxvkWindowState* pState,
|
||||
const WsiMode& mode) {
|
||||
return s_driver->setWindowMode(hMonitor, hWindow, mode);
|
||||
return s_driver->setWindowMode(hMonitor, hWindow, pState, mode);
|
||||
}
|
||||
|
||||
bool enterFullscreenMode(
|
||||
|
@ -60,6 +60,7 @@ namespace dxvk::wsi {
|
||||
virtual bool setWindowMode(
|
||||
HMONITOR hMonitor,
|
||||
HWND hWindow,
|
||||
DxvkWindowState* pState,
|
||||
const WsiMode& mode) = 0;
|
||||
|
||||
virtual bool enterFullscreenMode(
|
||||
|
@ -58,12 +58,14 @@ namespace dxvk::wsi {
|
||||
*
|
||||
* \param [in] hMonitor The monitor
|
||||
* \param [in] hWindow The window (may be unused on some platforms)
|
||||
* \param [in] pState The swapchain's window state
|
||||
* \param [in] mode The mode
|
||||
* \returns \c true on success, \c false on failure
|
||||
*/
|
||||
bool setWindowMode(
|
||||
HMONITOR hMonitor,
|
||||
HWND hWindow,
|
||||
DxvkWindowState* pState,
|
||||
const WsiMode& mode);
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user