mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 07:29:17 +01:00
[dxgi] Remove gamma control methods from DxgiOutput
This commit is contained in:
parent
015e67fc7c
commit
c88170966f
@ -230,20 +230,14 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE DxgiOutput::GetFrameStatistics(DXGI_FRAME_STATISTICS *pStats) {
|
HRESULT STDMETHODCALLTYPE DxgiOutput::GetFrameStatistics(DXGI_FRAME_STATISTICS *pStats) {
|
||||||
Com<DxgiSwapChain> swapChain = GetFullscreenSwapChain();
|
Logger::err("DxgiOutput::GetFrameStatistics: Not implemented");
|
||||||
|
return E_NOTIMPL;
|
||||||
return swapChain != nullptr
|
|
||||||
? swapChain->GetFrameStatistics(pStats)
|
|
||||||
: DXGI_ERROR_NOT_CURRENTLY_AVAILABLE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE DxgiOutput::GetGammaControl(DXGI_GAMMA_CONTROL *pArray) {
|
HRESULT STDMETHODCALLTYPE DxgiOutput::GetGammaControl(DXGI_GAMMA_CONTROL *pArray) {
|
||||||
Com<DxgiSwapChain> swapChain = GetFullscreenSwapChain();
|
Logger::err("DxgiOutput::GetGammaControl: Not implemented");
|
||||||
|
return E_NOTIMPL;
|
||||||
return swapChain != nullptr
|
|
||||||
? swapChain->GetGammaControl(pArray)
|
|
||||||
: DXGI_ERROR_NOT_CURRENTLY_AVAILABLE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -271,11 +265,8 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE DxgiOutput::SetGammaControl(const DXGI_GAMMA_CONTROL *pArray) {
|
HRESULT STDMETHODCALLTYPE DxgiOutput::SetGammaControl(const DXGI_GAMMA_CONTROL *pArray) {
|
||||||
Com<DxgiSwapChain> swapChain = GetFullscreenSwapChain();
|
Logger::err("DxgiOutput::SetGammaControl: Not implemented");
|
||||||
|
return E_NOTIMPL;
|
||||||
return swapChain != nullptr
|
|
||||||
? swapChain->SetGammaControl(pArray)
|
|
||||||
: DXGI_ERROR_NOT_CURRENTLY_AVAILABLE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -293,22 +284,6 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
BOOL DxgiOutput::SetSwapChain(DxgiSwapChain* pExpected, DxgiSwapChain* pDesired) {
|
|
||||||
std::lock_guard<std::mutex> lock(m_mutex);
|
|
||||||
|
|
||||||
if (m_fullscreenSwapChain == pExpected) {
|
|
||||||
m_fullscreenSwapChain = pDesired;
|
|
||||||
return TRUE;
|
|
||||||
} return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Com<DxgiSwapChain> DxgiOutput::GetFullscreenSwapChain() {
|
|
||||||
std::lock_guard<std::mutex> lock(m_mutex);
|
|
||||||
return Com<DxgiSwapChain>(m_fullscreenSwapChain);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
uint32_t DxgiOutput::GetFormatBpp(DXGI_FORMAT Format) const {
|
uint32_t DxgiOutput::GetFormatBpp(DXGI_FORMAT Format) const {
|
||||||
DxgiFormatInfo formatInfo = m_adapter->LookupFormat(Format, DxgiFormatMode::Any);
|
DxgiFormatInfo formatInfo = m_adapter->LookupFormat(Format, DxgiFormatMode::Any);
|
||||||
return imageFormatInfo(formatInfo.format)->elementSize * 8;
|
return imageFormatInfo(formatInfo.format)->elementSize * 8;
|
||||||
|
@ -67,20 +67,11 @@ namespace dxvk {
|
|||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE WaitForVBlank() final;
|
HRESULT STDMETHODCALLTYPE WaitForVBlank() final;
|
||||||
|
|
||||||
BOOL SetSwapChain(
|
|
||||||
DxgiSwapChain* pExpected,
|
|
||||||
DxgiSwapChain* pDesired);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
DxgiAdapter* m_adapter = nullptr;
|
DxgiAdapter* m_adapter = nullptr;
|
||||||
HMONITOR m_monitor = nullptr;
|
HMONITOR m_monitor = nullptr;
|
||||||
|
|
||||||
std::mutex m_mutex;
|
|
||||||
DxgiSwapChain* m_fullscreenSwapChain = nullptr;
|
|
||||||
|
|
||||||
Com<DxgiSwapChain> GetFullscreenSwapChain();
|
|
||||||
|
|
||||||
uint32_t GetFormatBpp(DXGI_FORMAT Format) const;
|
uint32_t GetFormatBpp(DXGI_FORMAT Format) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -59,8 +59,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
|
|
||||||
DxgiSwapChain::~DxgiSwapChain() {
|
DxgiSwapChain::~DxgiSwapChain() {
|
||||||
if (m_output != nullptr)
|
|
||||||
m_output->SetSwapChain(this, nullptr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -428,9 +427,6 @@ namespace dxvk {
|
|||||||
::SetWindowPos(m_desc.OutputWindow, HWND_TOPMOST,
|
::SetWindowPos(m_desc.OutputWindow, HWND_TOPMOST,
|
||||||
rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
|
rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top,
|
||||||
SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_NOACTIVATE);
|
SWP_FRAMECHANGED | SWP_SHOWWINDOW | SWP_NOACTIVATE);
|
||||||
|
|
||||||
// Assign this swap chain to the output
|
|
||||||
m_output->SetSwapChain(nullptr, this);
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -438,12 +434,6 @@ namespace dxvk {
|
|||||||
HRESULT DxgiSwapChain::LeaveFullscreenMode() {
|
HRESULT DxgiSwapChain::LeaveFullscreenMode() {
|
||||||
m_desc.Windowed = TRUE;
|
m_desc.Windowed = TRUE;
|
||||||
|
|
||||||
// Remove this swap chain from the output
|
|
||||||
if (m_output != nullptr) {
|
|
||||||
m_output->SetSwapChain(this, nullptr);
|
|
||||||
m_output = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME wine only restores window flags if the application
|
// FIXME wine only restores window flags if the application
|
||||||
// has not modified them in the meantime. Some applications
|
// has not modified them in the meantime. Some applications
|
||||||
// may rely on that behaviour.
|
// may rely on that behaviour.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user