gpu - small refinements to BPP-setting interfaces
This commit is contained in:
parent
18f02cb7d3
commit
71eb37f44e
|
@ -8125,6 +8125,10 @@ void GPUSubsystem::SetCustomFramebufferSize(size_t w, size_t h)
|
||||||
|
|
||||||
void GPUSubsystem::SetColorFormat(const NDSColorFormat outputFormat)
|
void GPUSubsystem::SetColorFormat(const NDSColorFormat outputFormat)
|
||||||
{
|
{
|
||||||
|
//check for no-op
|
||||||
|
if(this->_displayInfo.colorFormat == outputFormat)
|
||||||
|
return;
|
||||||
|
|
||||||
this->_displayInfo.colorFormat = outputFormat;
|
this->_displayInfo.colorFormat = outputFormat;
|
||||||
this->_displayInfo.pixelBytes = (outputFormat == NDSColorFormat_BGR555_Rev) ? sizeof(u16) : sizeof(FragmentColor);
|
this->_displayInfo.pixelBytes = (outputFormat == NDSColorFormat_BGR555_Rev) ? sizeof(u16) : sizeof(FragmentColor);
|
||||||
|
|
||||||
|
@ -8136,6 +8140,11 @@ void GPUSubsystem::SetColorFormat(const NDSColorFormat outputFormat)
|
||||||
this->_AllocateFramebuffers(this->_displayInfo.colorFormat, this->_displayInfo.customWidth, this->_displayInfo.customHeight);
|
this->_AllocateFramebuffers(this->_displayInfo.colorFormat, this->_displayInfo.customWidth, this->_displayInfo.customHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NDSColorFormat GPUSubsystem::GetColorFormat() const
|
||||||
|
{
|
||||||
|
return this->_displayInfo.colorFormat;
|
||||||
|
}
|
||||||
|
|
||||||
void GPUSubsystem::_AllocateFramebuffers(NDSColorFormat outputFormat, size_t w, size_t h)
|
void GPUSubsystem::_AllocateFramebuffers(NDSColorFormat outputFormat, size_t w, size_t h)
|
||||||
{
|
{
|
||||||
void *oldMasterFramebuffer = this->_masterFramebuffer;
|
void *oldMasterFramebuffer = this->_masterFramebuffer;
|
||||||
|
|
|
@ -1716,6 +1716,7 @@ public:
|
||||||
size_t GetCustomFramebufferHeight() const;
|
size_t GetCustomFramebufferHeight() const;
|
||||||
void SetCustomFramebufferSize(size_t w, size_t h);
|
void SetCustomFramebufferSize(size_t w, size_t h);
|
||||||
void SetColorFormat(const NDSColorFormat outputFormat);
|
void SetColorFormat(const NDSColorFormat outputFormat);
|
||||||
|
NDSColorFormat GetColorFormat() const;
|
||||||
|
|
||||||
bool GetWillFrameSkip() const;
|
bool GetWillFrameSkip() const;
|
||||||
void SetWillFrameSkip(const bool willFrameSkip);
|
void SetWillFrameSkip(const bool willFrameSkip);
|
||||||
|
|
Loading…
Reference in New Issue