From 4cfa910e75adce825ca56c5288e9bcb4729710ef Mon Sep 17 00:00:00 2001 From: rogerman Date: Tue, 5 Sep 2017 13:12:31 -0700 Subject: [PATCH] Cocoa Port: NEW FEATURE - Users can now apply custom colors to individual HUD line items. --- desmume/src/OGLRender.h | 2 +- .../src/frontend/cocoa/ClientDisplayView.cpp | 240 +++- .../src/frontend/cocoa/ClientDisplayView.h | 23 +- .../src/frontend/cocoa/DefaultUserPrefs.plist | 12 + .../src/frontend/cocoa/OGLDisplayOutput.cpp | 199 ++-- desmume/src/frontend/cocoa/OGLDisplayOutput.h | 7 +- desmume/src/frontend/cocoa/cocoa_output.h | 6 + desmume/src/frontend/cocoa/cocoa_output.mm | 102 ++ desmume/src/frontend/cocoa/cocoa_util.h | 11 +- desmume/src/frontend/cocoa/cocoa_util.mm | 97 +- .../English.lproj/MainMenu.strings | Bin 381024 -> 381824 bytes .../translations/English.lproj/MainMenu.xib | 1014 ++++++++++++++++- .../userinterface/DisplayWindowController.h | 6 + .../userinterface/DisplayWindowController.mm | 80 ++ .../cocoa/userinterface/MacMetalDisplayView.h | 1 + .../userinterface/MacMetalDisplayView.mm | 15 +- .../MacMetalDisplayViewShaders.metal | 41 +- .../cocoa/userinterface/appDelegate.mm | 23 + 18 files changed, 1719 insertions(+), 160 deletions(-) diff --git a/desmume/src/OGLRender.h b/desmume/src/OGLRender.h index 596b3a28f..8729c6db5 100755 --- a/desmume/src/OGLRender.h +++ b/desmume/src/OGLRender.h @@ -301,7 +301,7 @@ enum OGLVertexAttributeID { OGLVertexAttributeID_Position = 0, OGLVertexAttributeID_TexCoord0 = 8, - OGLVertexAttributeID_Color = 3, + OGLVertexAttributeID_Color = 3 }; enum OGLTextureUnitID diff --git a/desmume/src/frontend/cocoa/ClientDisplayView.cpp b/desmume/src/frontend/cocoa/ClientDisplayView.cpp index 52e3a2361..af41b1dc7 100644 --- a/desmume/src/frontend/cocoa/ClientDisplayView.cpp +++ b/desmume/src/frontend/cocoa/ClientDisplayView.cpp @@ -93,6 +93,13 @@ void ClientDisplayView::__InstanceInit(const ClientDisplayViewProperties &props) _showCPULoadAverage = false; _showRTC = false; + _hudColorVideoFPS = 0xFFFFFFFF; + _hudColorRender3DFPS = 0xFFFFFFFF; + _hudColorFrameIndex = 0xFFFFFFFF; + _hudColorLagFrameCount = 0xFFFFFFFF; + _hudColorCPULoadAverage = 0xFFFFFFFF; + _hudColorRTC = 0xFFFFFFFF; + _clientFrameInfo.videoFPS = 0; _ndsFrameInfo.clear(); @@ -560,6 +567,102 @@ void ClientDisplayView::SetHUDShowRTC(const bool visibleState) this->UpdateView(); } +uint32_t ClientDisplayView::GetHUDColorVideoFPS() const +{ + return this->_hudColorVideoFPS; +} + +void ClientDisplayView::SetHUDColorVideoFPS(uint32_t color32) +{ + this->_hudColorVideoFPS = color32; + + pthread_mutex_lock(&this->_mutexHUDString); + this->_hudNeedsUpdate = true; + pthread_mutex_unlock(&this->_mutexHUDString); + + this->UpdateView(); +} + +uint32_t ClientDisplayView::GetHUDColorRender3DFPS() const +{ + return this->_hudColorRender3DFPS; +} + +void ClientDisplayView::SetHUDColorRender3DFPS(uint32_t color32) +{ + this->_hudColorRender3DFPS = color32; + + pthread_mutex_lock(&this->_mutexHUDString); + this->_hudNeedsUpdate = true; + pthread_mutex_unlock(&this->_mutexHUDString); + + this->UpdateView(); +} + +uint32_t ClientDisplayView::GetHUDColorFrameIndex() const +{ + return this->_hudColorFrameIndex; +} + +void ClientDisplayView::SetHUDColorFrameIndex(uint32_t color32) +{ + this->_hudColorFrameIndex = color32; + + pthread_mutex_lock(&this->_mutexHUDString); + this->_hudNeedsUpdate = true; + pthread_mutex_unlock(&this->_mutexHUDString); + + this->UpdateView(); +} + +uint32_t ClientDisplayView::GetHUDColorLagFrameCount() const +{ + return this->_hudColorLagFrameCount; +} + +void ClientDisplayView::SetHUDColorLagFrameCount(uint32_t color32) +{ + this->_hudColorLagFrameCount = color32; + + pthread_mutex_lock(&this->_mutexHUDString); + this->_hudNeedsUpdate = true; + pthread_mutex_unlock(&this->_mutexHUDString); + + this->UpdateView(); +} + +uint32_t ClientDisplayView::GetHUDColorCPULoadAverage() const +{ + return this->_hudColorCPULoadAverage; +} + +void ClientDisplayView::SetHUDColorCPULoadAverage(uint32_t color32) +{ + this->_hudColorCPULoadAverage = color32; + + pthread_mutex_lock(&this->_mutexHUDString); + this->_hudNeedsUpdate = true; + pthread_mutex_unlock(&this->_mutexHUDString); + + this->UpdateView(); +} + +uint32_t ClientDisplayView::GetHUDColorRTC() const +{ + return this->_hudColorRTC; +} + +void ClientDisplayView::SetHUDColorRTC(uint32_t color32) +{ + this->_hudColorRTC = color32; + + pthread_mutex_lock(&this->_mutexHUDString); + this->_hudNeedsUpdate = true; + pthread_mutex_unlock(&this->_mutexHUDString); + + this->UpdateView(); +} + bool ClientDisplayView::HUDNeedsUpdate() { pthread_mutex_lock(&this->_mutexHUDString); @@ -1186,7 +1289,7 @@ void ClientDisplay3DView::SetSourceDeposterize(bool useDeposterize) this->_useDeposterize = (this->_canFilterOnGPU) ? useDeposterize : false; } -void ClientDisplay3DView::SetHUDVertices(float viewportWidth, float viewportHeight, float *vtxBufferPtr) +void ClientDisplay3DView::SetHUDPositionVertices(float viewportWidth, float viewportHeight, float *vtxPositionBufferPtr) { pthread_mutex_lock(&this->_mutexHUDString); std::string hudString = this->_hudString; @@ -1203,10 +1306,10 @@ void ClientDisplay3DView::SetHUDVertices(float viewportWidth, float viewportHeig // First, calculate the vertices of the text box. // The text box should always be the first character in the string. - vtxBufferPtr[0] = 0.0f; vtxBufferPtr[1] = 0.0f; - vtxBufferPtr[2] = charLocX; vtxBufferPtr[3] = 0.0f; - vtxBufferPtr[4] = charLocX; vtxBufferPtr[5] = -textBoxTextOffset; - vtxBufferPtr[6] = 0.0f; vtxBufferPtr[7] = -textBoxTextOffset; + vtxPositionBufferPtr[0] = 0.0f; vtxPositionBufferPtr[1] = 0.0f; + vtxPositionBufferPtr[2] = charLocX; vtxPositionBufferPtr[3] = 0.0f; + vtxPositionBufferPtr[4] = charLocX; vtxPositionBufferPtr[5] = -textBoxTextOffset; + vtxPositionBufferPtr[6] = 0.0f; vtxPositionBufferPtr[7] = -textBoxTextOffset; // Calculate the vertices of the remaining characters in the string. for (size_t i = 1, j = 8; i < length; i++, j+=8) @@ -1220,8 +1323,8 @@ void ClientDisplay3DView::SetHUDVertices(float viewportWidth, float viewportHeig textBoxWidth = charLocX; } - vtxBufferPtr[5] -= lineHeight; - vtxBufferPtr[7] -= lineHeight; + vtxPositionBufferPtr[5] -= lineHeight; + vtxPositionBufferPtr[7] -= lineHeight; charLocX = textBoxTextOffset; charLocY -= lineHeight; @@ -1230,10 +1333,10 @@ void ClientDisplay3DView::SetHUDVertices(float viewportWidth, float viewportHeig const float charWidth = this->_glyphInfo[c].width * charSize / (float)this->_glyphTileSize; - vtxBufferPtr[j+0] = charLocX; vtxBufferPtr[j+1] = charLocY + charSize; // Top Left - vtxBufferPtr[j+2] = charLocX + charWidth; vtxBufferPtr[j+3] = charLocY + charSize; // Top Right - vtxBufferPtr[j+4] = charLocX + charWidth; vtxBufferPtr[j+5] = charLocY; // Bottom Right - vtxBufferPtr[j+6] = charLocX; vtxBufferPtr[j+7] = charLocY; // Bottom Left + vtxPositionBufferPtr[j+0] = charLocX; vtxPositionBufferPtr[j+1] = charLocY + charSize; // Top Left + vtxPositionBufferPtr[j+2] = charLocX + charWidth; vtxPositionBufferPtr[j+3] = charLocY + charSize; // Top Right + vtxPositionBufferPtr[j+4] = charLocX + charWidth; vtxPositionBufferPtr[j+5] = charLocY; // Bottom Right + vtxPositionBufferPtr[j+6] = charLocX; vtxPositionBufferPtr[j+7] = charLocY; // Bottom Left charLocX += (charWidth + (charSize * 0.03f) + 0.10f); } @@ -1258,19 +1361,122 @@ void ClientDisplay3DView::SetHUDVertices(float viewportWidth, float viewportHeig boxOffset *= this->_scaleFactor; // Set the width of the text box - vtxBufferPtr[2] += textBoxWidth; - vtxBufferPtr[4] += textBoxWidth; + vtxPositionBufferPtr[2] += textBoxWidth; + vtxPositionBufferPtr[4] += textBoxWidth; // Scale and translate the box for (size_t i = 0; i < (length * 8); i+=2) { // Scale - vtxBufferPtr[i+0] *= textBoxScale; - vtxBufferPtr[i+1] *= textBoxScale; + vtxPositionBufferPtr[i+0] *= textBoxScale; + vtxPositionBufferPtr[i+1] *= textBoxScale; // Translate - vtxBufferPtr[i+0] += boxOffset - (viewportWidth / 2.0f); - vtxBufferPtr[i+1] += (viewportHeight / 2.0f) - boxOffset; + vtxPositionBufferPtr[i+0] += boxOffset - (viewportWidth / 2.0f); + vtxPositionBufferPtr[i+1] += (viewportHeight / 2.0f) - boxOffset; + } +} + +void ClientDisplay3DView::SetHUDColorVertices(uint32_t *vtxColorBufferPtr) +{ + pthread_mutex_lock(&this->_mutexHUDString); + std::string hudString = this->_hudString; + pthread_mutex_unlock(&this->_mutexHUDString); + + const char *cString = hudString.c_str(); + const size_t length = hudString.length(); + uint32_t currentColor = 0x40000000; + + // First, calculate the color of the text box. + // The text box should always be the first character in the string. + vtxColorBufferPtr[0] = currentColor; + vtxColorBufferPtr[1] = currentColor; + vtxColorBufferPtr[2] = currentColor; + vtxColorBufferPtr[3] = currentColor; + + // Calculate the colors of the remaining characters in the string. + bool alreadyColoredVideoFPS = false; + bool alreadyColoredRender3DFPS = false; + bool alreadyColoredFrameIndex = false; + bool alreadyColoredLagFrameCount = false; + bool alreadyColoredCPULoadAverage = false; + bool alreadyColoredRTC = false; + + if (this->_showVideoFPS) + { + currentColor = this->_hudColorVideoFPS; + alreadyColoredVideoFPS = true; + } + else if (this->_showRender3DFPS) + { + currentColor = this->_hudColorRender3DFPS; + alreadyColoredRender3DFPS = true; + } + else if (this->_showFrameIndex) + { + currentColor = this->_hudColorFrameIndex; + alreadyColoredFrameIndex = true; + } + else if (this->_showLagFrameCount) + { + currentColor = this->_hudColorLagFrameCount; + alreadyColoredLagFrameCount = true; + } + else if (this->_showCPULoadAverage) + { + currentColor = this->_hudColorCPULoadAverage; + alreadyColoredCPULoadAverage = true; + } + else if (this->_showRTC) + { + currentColor = this->_hudColorRTC; + alreadyColoredRTC = true; + } + + for (size_t i = 1, j = 4; i < length; i++, j+=4) + { + const char c = cString[i]; + + if (c == '\n') + { + if (this->_showVideoFPS && !alreadyColoredVideoFPS) + { + currentColor = this->_hudColorVideoFPS; + alreadyColoredVideoFPS = true; + } + else if (this->_showRender3DFPS && !alreadyColoredRender3DFPS) + { + currentColor = this->_hudColorRender3DFPS; + alreadyColoredRender3DFPS = true; + } + else if (this->_showFrameIndex && !alreadyColoredFrameIndex) + { + currentColor = this->_hudColorFrameIndex; + alreadyColoredFrameIndex = true; + } + else if (this->_showLagFrameCount && !alreadyColoredLagFrameCount) + { + currentColor = this->_hudColorLagFrameCount; + alreadyColoredLagFrameCount = true; + } + else if (this->_showCPULoadAverage && !alreadyColoredCPULoadAverage) + { + currentColor = this->_hudColorCPULoadAverage; + alreadyColoredCPULoadAverage = true; + } + else if (this->_showRTC && !alreadyColoredRTC) + { + currentColor = this->_hudColorRTC; + alreadyColoredRTC = true; + } + + continue; + } + + vtxColorBufferPtr[j+0] = currentColor; // Top Left + vtxColorBufferPtr[j+1] = currentColor; // Top Right + vtxColorBufferPtr[j+2] = currentColor; // Bottom Right + vtxColorBufferPtr[j+3] = currentColor; // Bottom Left } } diff --git a/desmume/src/frontend/cocoa/ClientDisplayView.h b/desmume/src/frontend/cocoa/ClientDisplayView.h index 69b30fc05..d39f512e2 100644 --- a/desmume/src/frontend/cocoa/ClientDisplayView.h +++ b/desmume/src/frontend/cocoa/ClientDisplayView.h @@ -31,6 +31,7 @@ #define HUD_MAX_CHARACTERS 2048 #define HUD_VERTEX_ATTRIBUTE_BUFFER_SIZE (sizeof(float) * HUD_MAX_CHARACTERS * (2 * 4)) +#define HUD_VERTEX_COLOR_ATTRIBUTE_BUFFER_SIZE (sizeof(uint32_t) * HUD_MAX_CHARACTERS * 4) #define HUD_TEXTBOX_BASEGLYPHSIZE 64.0 #define HUD_TEXTBOX_BASE_SCALE (1.0/3.0) #define HUD_TEXTBOX_MIN_SCALE 0.70 @@ -160,6 +161,13 @@ protected: bool _showCPULoadAverage; bool _showRTC; + uint32_t _hudColorVideoFPS; + uint32_t _hudColorRender3DFPS; + uint32_t _hudColorFrameIndex; + uint32_t _hudColorLagFrameCount; + uint32_t _hudColorCPULoadAverage; + uint32_t _hudColorRTC; + ClientFrameInfo _clientFrameInfo; NDSFrameInfo _ndsFrameInfo; @@ -259,6 +267,18 @@ public: virtual void SetHUDShowCPULoadAverage(const bool visibleState); bool GetHUDShowRTC() const; virtual void SetHUDShowRTC(const bool visibleState); + uint32_t GetHUDColorVideoFPS() const; + virtual void SetHUDColorVideoFPS(uint32_t color32); + uint32_t GetHUDColorRender3DFPS() const; + virtual void SetHUDColorRender3DFPS(uint32_t color32); + uint32_t GetHUDColorFrameIndex() const; + virtual void SetHUDColorFrameIndex(uint32_t color32); + uint32_t GetHUDColorLagFrameCount() const; + virtual void SetHUDColorLagFrameCount(uint32_t color32); + uint32_t GetHUDColorCPULoadAverage() const; + virtual void SetHUDColorCPULoadAverage(uint32_t color32); + uint32_t GetHUDColorRTC() const; + virtual void SetHUDColorRTC(uint32_t color32); bool HUDNeedsUpdate(); void ClearHUDNeedsUpdate(); @@ -319,7 +339,8 @@ public: virtual void SetSourceDeposterize(const bool useDeposterize); - void SetHUDVertices(float viewportWidth, float viewportHeight, float *vtxBufferPtr); + void SetHUDPositionVertices(float viewportWidth, float viewportHeight, float *vtxPositionBufferPtr); + void SetHUDColorVertices(uint32_t *vtxColorBufferPtr); void SetHUDTextureCoordinates(float *texCoordBufferPtr); void SetScreenVertices(float *vtxBufferPtr); void SetScreenTextureCoordinates(float w0, float h0, float w1, float h1, float *texCoordBufferPtr); diff --git a/desmume/src/frontend/cocoa/DefaultUserPrefs.plist b/desmume/src/frontend/cocoa/DefaultUserPrefs.plist index 28d97eb41..7c57c08ca 100644 --- a/desmume/src/frontend/cocoa/DefaultUserPrefs.plist +++ b/desmume/src/frontend/cocoa/DefaultUserPrefs.plist @@ -118,6 +118,18 @@ HUD_ShowRTC + HUD_Color_VideoFPS + 4294967295 + HUD_Color_Render3DFPS + 4294967295 + HUD_Color_FrameIndex + 4294967295 + HUD_Color_LagFrameCount + 4294967295 + HUD_Color_CPULoadAverage + 4294967295 + HUD_Color_RTC + 4294967295 Input_AudioInputMode 1 Input_ControllerMappings diff --git a/desmume/src/frontend/cocoa/OGLDisplayOutput.cpp b/desmume/src/frontend/cocoa/OGLDisplayOutput.cpp index 1d4ff9765..37ee65be1 100644 --- a/desmume/src/frontend/cocoa/OGLDisplayOutput.cpp +++ b/desmume/src/frontend/cocoa/OGLDisplayOutput.cpp @@ -28,10 +28,12 @@ // VERTEX SHADER FOR HUD OUTPUT static const char *HUDOutputVertShader_100 = {"\ ATTRIBUTE vec2 inPosition; \n\ + ATTRIBUTE vec4 inColor; \n\ ATTRIBUTE vec2 inTexCoord0; \n\ \n\ uniform vec2 viewSize; \n\ \n\ + VARYING vec4 vtxColor; \n\ VARYING vec2 texCoord[1]; \n\ \n\ void main() \n\ @@ -39,6 +41,7 @@ static const char *HUDOutputVertShader_100 = {"\ mat2 projection = mat2( vec2(2.0/viewSize.x, 0.0), \n\ vec2( 0.0, 2.0/viewSize.y)); \n\ \n\ + vtxColor = inColor; \n\ texCoord[0] = inTexCoord0; \n\ gl_Position = vec4(projection * inPosition, 0.0, 1.0);\n\ } \n\ @@ -46,12 +49,13 @@ static const char *HUDOutputVertShader_100 = {"\ // FRAGMENT SHADER FOR HUD OUTPUT static const char *HUDOutputFragShader_110 = {"\ + VARYING vec4 vtxColor;\n\ VARYING vec2 texCoord[1];\n\ uniform sampler2D tex;\n\ \n\ void main()\n\ {\n\ - OUT_FRAG_COLOR = SAMPLE4_TEX_2D(tex, texCoord[0]);\n\ + OUT_FRAG_COLOR = SAMPLE4_TEX_2D(tex, texCoord[0]) * vtxColor;\n\ }\n\ "}; @@ -4108,8 +4112,9 @@ static const char *Scaler6xBRZFragShader_110 = {"\ enum OGLVertexAttributeID { - OGLVertexAttributeID_Position = 0, - OGLVertexAttributeID_TexCoord0 = 8 + OGLVertexAttributeID_Position = 0, + OGLVertexAttributeID_TexCoord0 = 8, + OGLVertexAttributeID_Color = 3 }; static const GLint filterVtxBuffer[8] = {-1, -1, 1, -1, -1, 1, 1, 1}; @@ -4594,7 +4599,7 @@ GLuint OGLShaderProgram::GetVertexShaderID() return this->_vertexID; } -void OGLShaderProgram::SetVertexShaderOGL(const char *shaderProgram, bool useShader150) +void OGLShaderProgram::SetVertexShaderOGL(const char *shaderProgram, bool useVtxColors, bool useShader150) { if (this->_vertexID != 0) { @@ -4609,6 +4614,11 @@ void OGLShaderProgram::SetVertexShaderOGL(const char *shaderProgram, bool useSha glAttachShader(this->_programID, this->_vertexID); glBindAttribLocation(this->_programID, OGLVertexAttributeID_Position, "inPosition"); glBindAttribLocation(this->_programID, OGLVertexAttributeID_TexCoord0, "inTexCoord0"); + + if (useVtxColors) + { + glBindAttribLocation(this->_programID, OGLVertexAttributeID_Color, "inColor"); + } } if (this->_vertexID != 0 && this->_fragmentID != 0) @@ -4647,7 +4657,7 @@ void OGLShaderProgram::SetFragmentShaderOGL(const char *shaderProgram, bool useS } } -void OGLShaderProgram::SetVertexAndFragmentShaderOGL(const char *vertShaderProgram, const char *fragShaderProgram, bool useShader150) +void OGLShaderProgram::SetVertexAndFragmentShaderOGL(const char *vertShaderProgram, const char *fragShaderProgram, bool useVtxColors, bool useShader150) { if (this->_vertexID != 0) { @@ -4669,6 +4679,11 @@ void OGLShaderProgram::SetVertexAndFragmentShaderOGL(const char *vertShaderProgr glAttachShader(this->_programID, this->_vertexID); glBindAttribLocation(this->_programID, OGLVertexAttributeID_Position, "inPosition"); glBindAttribLocation(this->_programID, OGLVertexAttributeID_TexCoord0, "inTexCoord0"); + + if (useVtxColors) + { + glBindAttribLocation(this->_programID, OGLVertexAttributeID_Color, "inColor"); + } } if (this->_fragmentID != 0) @@ -5442,7 +5457,7 @@ OGLFilterDeposterize::OGLFilterDeposterize(GLsizei srcWidth, GLsizei srcHeight, glBindTexture(GL_TEXTURE_RECTANGLE_ARB, 0); _program->SetShaderSupport(theTier); - _program->SetVertexShaderOGL(Sample3x3_VertShader_110, useShader150); + _program->SetVertexShaderOGL(Sample3x3_VertShader_110, false, useShader150); _program->SetFragmentShaderOGL(FilterDeposterizeFragShader_110, useShader150); } @@ -5595,7 +5610,7 @@ OGLImage::OGLImage(OGLContextInfo *contextInfo, GLsizei imageWidth, GLsizei imag { _finalOutputProgram = new OGLShaderProgram; _finalOutputProgram->SetShaderSupport(_shaderSupport); - _finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, _useShader150); + _finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, false, _useShader150); const GLuint finalOutputProgramID = _finalOutputProgram->GetProgramID(); glUseProgram(finalOutputProgramID); @@ -5617,7 +5632,7 @@ OGLImage::OGLImage(OGLContextInfo *contextInfo, GLsizei imageWidth, GLsizei imag _shaderFilter = new OGLFilter(_vf->GetSrcWidth(), _vf->GetSrcHeight(), 1); OGLShaderProgram *shaderFilterProgram = _shaderFilter->GetProgram(); shaderFilterProgram->SetShaderSupport(_shaderSupport); - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, PassthroughFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, PassthroughFragShader_110, false, _useShader150); SetupHQnxLUTs_OGL(GL_TEXTURE0 + 1, _texLQ2xLUT, _texHQ2xLUT, _texHQ3xLUT, _texHQ4xLUT); } @@ -5773,45 +5788,45 @@ void OGLImage::SetOutputFilterOGL(const int filterID) switch (filterID) { case OutputFilterTypeID_NearestNeighbor: - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, _useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, false, _useShader150); break; case OutputFilterTypeID_Bilinear: - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, _useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, false, _useShader150); this->_displayTexFilter = GL_LINEAR; break; case OutputFilterTypeID_BicubicBSpline: - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterBicubicBSplineFragShader_110, _useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterBicubicBSplineFragShader_110, false, _useShader150); break; case OutputFilterTypeID_BicubicMitchell: - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterBicubicMitchellNetravaliFragShader_110, _useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterBicubicMitchellNetravaliFragShader_110, false, _useShader150); break; case OutputFilterTypeID_Lanczos2: - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterLanczos2FragShader_110, _useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterLanczos2FragShader_110, false, _useShader150); break; case OutputFilterTypeID_Lanczos3: { if (this->_shaderSupport >= ShaderSupport_HighTier) { - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample6x6Output_VertShader_110, FilterLanczos3FragShader_110, _useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample6x6Output_VertShader_110, FilterLanczos3FragShader_110, false, _useShader150); } else if (this->_shaderSupport >= ShaderSupport_MidTier) { - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample5x5Output_VertShader_110, FilterLanczos3FragShader_110, _useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample5x5Output_VertShader_110, FilterLanczos3FragShader_110, false, _useShader150); } else { - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterLanczos3FragShader_110, _useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterLanczos3FragShader_110, false, _useShader150); } break; } default: - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, _useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, false, _useShader150); this->_outputFilter = OutputFilterTypeID_NearestNeighbor; break; } @@ -5861,74 +5876,74 @@ bool OGLImage::SetGPUPixelScalerOGL(const VideoFilterTypeID filterID) switch (filterID) { case VideoFilterTypeID_Nearest1_5X: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, PassthroughFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, PassthroughFragShader_110, false, _useShader150); break; case VideoFilterTypeID_Nearest2X: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, PassthroughFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, PassthroughFragShader_110, false, _useShader150); break; case VideoFilterTypeID_Scanline: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, Scalar2xScanlineFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, Scalar2xScanlineFragShader_110, false, _useShader150); break; case VideoFilterTypeID_EPX: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, Scalar2xEPXFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, Scalar2xEPXFragShader_110, false, _useShader150); break; case VideoFilterTypeID_EPXPlus: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, Scalar2xEPXPlusFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, Scalar2xEPXPlusFragShader_110, false, _useShader150); break; case VideoFilterTypeID_2xSaI: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, Scalar2xSaIFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, Scalar2xSaIFragShader_110, false, _useShader150); break; case VideoFilterTypeID_Super2xSaI: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, ScalarSuper2xSaIFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, ScalarSuper2xSaIFragShader_110, false, _useShader150); break; case VideoFilterTypeID_SuperEagle: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, ScalarSuperEagle2xFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, ScalarSuperEagle2xFragShader_110, false, _useShader150); break; case VideoFilterTypeID_LQ2X: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerLQ2xFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerLQ2xFragShader_110, false, _useShader150); currentHQnxLUT = this->_texLQ2xLUT; break; case VideoFilterTypeID_LQ2XS: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerLQ2xSFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerLQ2xSFragShader_110, false, _useShader150); currentHQnxLUT = this->_texLQ2xLUT; break; case VideoFilterTypeID_HQ2X: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ2xFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ2xFragShader_110, false, _useShader150); currentHQnxLUT = this->_texHQ2xLUT; break; case VideoFilterTypeID_HQ2XS: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ2xSFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ2xSFragShader_110, false, _useShader150); currentHQnxLUT = this->_texHQ2xLUT; break; case VideoFilterTypeID_HQ3X: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ3xFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ3xFragShader_110, false, _useShader150); currentHQnxLUT = this->_texHQ3xLUT; break; case VideoFilterTypeID_HQ3XS: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ3xSFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ3xSFragShader_110, false, _useShader150); currentHQnxLUT = this->_texHQ3xLUT; break; case VideoFilterTypeID_HQ4X: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ4xFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ4xFragShader_110, false, _useShader150); currentHQnxLUT = this->_texHQ4xLUT; break; case VideoFilterTypeID_HQ4XS: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ4xSFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ4xSFragShader_110, false, _useShader150); currentHQnxLUT = this->_texHQ4xLUT; break; @@ -5936,11 +5951,11 @@ bool OGLImage::SetGPUPixelScalerOGL(const VideoFilterTypeID filterID) { if (this->_shaderSupport >= ShaderSupport_MidTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler2xBRZFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler2xBRZFragShader_110, false, _useShader150); } else if (this->_shaderSupport >= ShaderSupport_LowTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, Scaler2xBRZFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, Scaler2xBRZFragShader_110, false, _useShader150); } else { @@ -5953,11 +5968,11 @@ bool OGLImage::SetGPUPixelScalerOGL(const VideoFilterTypeID filterID) { if (this->_shaderSupport >= ShaderSupport_MidTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler3xBRZFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler3xBRZFragShader_110, false, _useShader150); } else if (this->_shaderSupport >= ShaderSupport_LowTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, Scaler3xBRZFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, Scaler3xBRZFragShader_110, false, _useShader150); } else { @@ -5970,7 +5985,7 @@ bool OGLImage::SetGPUPixelScalerOGL(const VideoFilterTypeID filterID) { if (this->_shaderSupport >= ShaderSupport_MidTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler4xBRZFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler4xBRZFragShader_110, false, _useShader150); } else { @@ -5984,7 +5999,7 @@ bool OGLImage::SetGPUPixelScalerOGL(const VideoFilterTypeID filterID) { if (this->_shaderSupport >= ShaderSupport_MidTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler5xBRZFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler5xBRZFragShader_110, false, _useShader150); } else { @@ -5997,7 +6012,7 @@ bool OGLImage::SetGPUPixelScalerOGL(const VideoFilterTypeID filterID) { if (this->_shaderSupport >= ShaderSupport_MidTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler6xBRZFragShader_110, _useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler6xBRZFragShader_110, false, _useShader150); } else { @@ -6187,7 +6202,7 @@ OGLHUDLayer::OGLHUDLayer(OGLVideoOutput *oglVO) { _program = new OGLShaderProgram; _program->SetShaderSupport(oglVO->GetContextInfo()->GetShaderSupport()); - _program->SetVertexAndFragmentShaderOGL(HUDOutputVertShader_100, HUDOutputFragShader_110, oglVO->GetContextInfo()->IsUsingShader150()); + _program->SetVertexAndFragmentShaderOGL(HUDOutputVertShader_100, HUDOutputFragShader_110, true, oglVO->GetContextInfo()->IsUsingShader150()); glUseProgram(_program->GetProgramID()); _uniformViewSize = glGetUniformLocation(_program->GetProgramID(), "viewSize"); @@ -6201,12 +6216,15 @@ OGLHUDLayer::OGLHUDLayer(OGLVideoOutput *oglVO) glGenTextures(1, &_texCharMap); // Set up VBOs - glGenBuffersARB(1, &_vboVertexID); + glGenBuffersARB(1, &_vboPositionVertexID); + glGenBuffersARB(1, &_vboColorVertexID); glGenBuffersARB(1, &_vboTexCoordID); glGenBuffersARB(1, &_vboElementID); - glBindBufferARB(GL_ARRAY_BUFFER_ARB, _vboVertexID); + glBindBufferARB(GL_ARRAY_BUFFER_ARB, _vboPositionVertexID); glBufferDataARB(GL_ARRAY_BUFFER_ARB, HUD_VERTEX_ATTRIBUTE_BUFFER_SIZE, NULL, GL_STREAM_DRAW_ARB); + glBindBufferARB(GL_ARRAY_BUFFER_ARB, _vboColorVertexID); + glBufferDataARB(GL_ARRAY_BUFFER_ARB, HUD_VERTEX_COLOR_ATTRIBUTE_BUFFER_SIZE, NULL, GL_STREAM_DRAW_ARB); glBindBufferARB(GL_ARRAY_BUFFER_ARB, _vboTexCoordID); glBufferDataARB(GL_ARRAY_BUFFER_ARB, HUD_VERTEX_ATTRIBUTE_BUFFER_SIZE, NULL, GL_STREAM_DRAW_ARB); glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0); @@ -6234,24 +6252,30 @@ OGLHUDLayer::OGLHUDLayer(OGLVideoOutput *oglVO) if (oglVO->GetContextInfo()->IsShaderSupported()) { - glBindBufferARB(GL_ARRAY_BUFFER_ARB, _vboVertexID); + glBindBufferARB(GL_ARRAY_BUFFER_ARB, _vboPositionVertexID); glVertexAttribPointer(OGLVertexAttributeID_Position, 2, GL_FLOAT, GL_FALSE, 0, NULL); + glBindBufferARB(GL_ARRAY_BUFFER_ARB, _vboColorVertexID); + glVertexAttribPointer(OGLVertexAttributeID_Color, 4, GL_UNSIGNED_BYTE, GL_TRUE, 0, NULL); glBindBufferARB(GL_ARRAY_BUFFER_ARB, _vboTexCoordID); glVertexAttribPointer(OGLVertexAttributeID_TexCoord0, 2, GL_FLOAT, GL_FALSE, 0, NULL); glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, _vboElementID); glEnableVertexAttribArray(OGLVertexAttributeID_Position); + glEnableVertexAttribArray(OGLVertexAttributeID_Color); glEnableVertexAttribArray(OGLVertexAttributeID_TexCoord0); } else { - glBindBufferARB(GL_ARRAY_BUFFER_ARB, _vboVertexID); + glBindBufferARB(GL_ARRAY_BUFFER_ARB, _vboPositionVertexID); glVertexPointer(2, GL_FLOAT, 0, NULL); + glBindBufferARB(GL_ARRAY_BUFFER_ARB, _vboColorVertexID); + glColorPointer(4, GL_UNSIGNED_BYTE, 0, NULL); glBindBufferARB(GL_ARRAY_BUFFER_ARB, _vboTexCoordID); glTexCoordPointer(2, GL_FLOAT, 0, NULL); glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, _vboElementID); glEnableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_COLOR_ARRAY); glEnableClientState(GL_TEXTURE_COORD_ARRAY); } @@ -6267,7 +6291,8 @@ OGLHUDLayer::~OGLHUDLayer() } glDeleteVertexArraysDESMUME(1, &this->_vaoMainStatesID); - glDeleteBuffersARB(1, &this->_vboVertexID); + glDeleteBuffersARB(1, &this->_vboPositionVertexID); + glDeleteBuffersARB(1, &this->_vboColorVertexID); glDeleteBuffersARB(1, &this->_vboTexCoordID); glDeleteBuffersARB(1, &this->_vboElementID); @@ -6310,7 +6335,7 @@ void OGLHUDLayer::CopyHUDFont(const FT_Face &fontFace, const size_t glyphSize, c { for (size_t pixIndex = 0; pixIndex < tileSize; pixIndex++) { - const uint32_t colorRGBA8888 = 0x50000000; + const uint32_t colorRGBA8888 = 0xFFFFFFFF; charMapBuffer[(tileSize + pixIndex) + (rowIndex * (16 * tileSize))] = colorRGBA8888; } } @@ -6368,10 +6393,16 @@ void OGLHUDLayer::_UpdateVerticesOGL() return; } - glBindBufferARB(GL_ARRAY_BUFFER_ARB, this->_vboVertexID); + glBindBufferARB(GL_ARRAY_BUFFER_ARB, this->_vboPositionVertexID); glBufferDataARB(GL_ARRAY_BUFFER_ARB, HUD_VERTEX_ATTRIBUTE_BUFFER_SIZE, NULL, GL_STREAM_DRAW_ARB); - float *vtxBufferPtr = (float *)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); - this->_output->SetHUDVertices((float)this->_output->GetViewportWidth(), (float)this->_output->GetViewportHeight(), vtxBufferPtr); + float *vtxPositionBufferPtr = (float *)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); + this->_output->SetHUDPositionVertices((float)this->_output->GetViewportWidth(), (float)this->_output->GetViewportHeight(), vtxPositionBufferPtr); + glUnmapBufferARB(GL_ARRAY_BUFFER_ARB); + + glBindBufferARB(GL_ARRAY_BUFFER_ARB, this->_vboColorVertexID); + glBufferDataARB(GL_ARRAY_BUFFER_ARB, HUD_VERTEX_COLOR_ATTRIBUTE_BUFFER_SIZE, NULL, GL_STREAM_DRAW_ARB); + uint32_t *vtxColorBufferPtr = (uint32_t *)glMapBufferARB(GL_ARRAY_BUFFER_ARB, GL_WRITE_ONLY_ARB); + this->_output->SetHUDColorVertices(vtxColorBufferPtr); glUnmapBufferARB(GL_ARRAY_BUFFER_ARB); glBindBufferARB(GL_ARRAY_BUFFER_ARB, this->_vboTexCoordID); @@ -6496,7 +6527,7 @@ OGLDisplayLayer::OGLDisplayLayer(OGLVideoOutput *oglVO) { _finalOutputProgram = new OGLShaderProgram; _finalOutputProgram->SetShaderSupport(shaderSupport); - _finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, useShader150); + _finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, false, useShader150); const GLuint finalOutputProgramID = _finalOutputProgram->GetProgramID(); glUseProgram(finalOutputProgramID); @@ -6519,7 +6550,7 @@ OGLDisplayLayer::OGLDisplayLayer(OGLVideoOutput *oglVO) _shaderFilter[i] = new OGLFilter(GPU_FRAMEBUFFER_NATIVE_WIDTH, GPU_FRAMEBUFFER_NATIVE_HEIGHT, 1); OGLShaderProgram *shaderFilterProgram = _shaderFilter[i]->GetProgram(); shaderFilterProgram->SetShaderSupport(shaderSupport); - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, PassthroughFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, PassthroughFragShader_110, false, useShader150); } } else @@ -6614,46 +6645,46 @@ OutputFilterTypeID OGLDisplayLayer::SetOutputFilterOGL(const OutputFilterTypeID switch (filterID) { case OutputFilterTypeID_NearestNeighbor: - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, false, useShader150); break; case OutputFilterTypeID_Bilinear: - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, false, useShader150); this->_displayTexFilter[0] = GL_LINEAR; this->_displayTexFilter[1] = GL_LINEAR; break; case OutputFilterTypeID_BicubicBSpline: - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterBicubicBSplineFragShader_110, useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterBicubicBSplineFragShader_110, false, useShader150); break; case OutputFilterTypeID_BicubicMitchell: - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterBicubicMitchellNetravaliFragShader_110, useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterBicubicMitchellNetravaliFragShader_110, false, useShader150); break; case OutputFilterTypeID_Lanczos2: - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterLanczos2FragShader_110, useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterLanczos2FragShader_110, false, useShader150); break; case OutputFilterTypeID_Lanczos3: { if (shaderSupport >= ShaderSupport_HighTier) { - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample6x6Output_VertShader_110, FilterLanczos3FragShader_110, useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample6x6Output_VertShader_110, FilterLanczos3FragShader_110, false, useShader150); } else if (shaderSupport >= ShaderSupport_MidTier) { - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample5x5Output_VertShader_110, FilterLanczos3FragShader_110, useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample5x5Output_VertShader_110, FilterLanczos3FragShader_110, false, useShader150); } else { - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterLanczos3FragShader_110, useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(BicubicSample4x4Output_VertShader_110, FilterLanczos3FragShader_110, false, useShader150); } break; } default: - this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, useShader150); + this->_finalOutputProgram->SetVertexAndFragmentShaderOGL(Sample1x1OutputVertShader_100, PassthroughOutputFragShader_110, false, useShader150); outputFilter = OutputFilterTypeID_NearestNeighbor; break; } @@ -6691,74 +6722,74 @@ bool OGLDisplayLayer::SetGPUPixelScalerOGL(const VideoFilterTypeID filterID) switch (filterID) { case VideoFilterTypeID_Nearest1_5X: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, PassthroughFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, PassthroughFragShader_110, false, useShader150); break; case VideoFilterTypeID_Nearest2X: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, PassthroughFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, PassthroughFragShader_110, false, useShader150); break; case VideoFilterTypeID_Scanline: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, Scalar2xScanlineFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample1x1_VertShader_110, Scalar2xScanlineFragShader_110, false, useShader150); break; case VideoFilterTypeID_EPX: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, Scalar2xEPXFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, Scalar2xEPXFragShader_110, false, useShader150); break; case VideoFilterTypeID_EPXPlus: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, Scalar2xEPXPlusFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, Scalar2xEPXPlusFragShader_110, false, useShader150); break; case VideoFilterTypeID_2xSaI: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, Scalar2xSaIFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, Scalar2xSaIFragShader_110, false, useShader150); break; case VideoFilterTypeID_Super2xSaI: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, ScalarSuper2xSaIFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, ScalarSuper2xSaIFragShader_110, false, useShader150); break; case VideoFilterTypeID_SuperEagle: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, ScalarSuperEagle2xFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, ScalarSuperEagle2xFragShader_110, false, useShader150); break; case VideoFilterTypeID_LQ2X: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerLQ2xFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerLQ2xFragShader_110, false, useShader150); currentHQnxLUT = ((const OGLClientFetchObject &)this->_output->GetFetchObject()).GetTexLQ2xLUT(); break; case VideoFilterTypeID_LQ2XS: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerLQ2xSFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerLQ2xSFragShader_110, false, useShader150); currentHQnxLUT = ((const OGLClientFetchObject &)this->_output->GetFetchObject()).GetTexLQ2xLUT(); break; case VideoFilterTypeID_HQ2X: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ2xFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ2xFragShader_110, false, useShader150); currentHQnxLUT = ((const OGLClientFetchObject &)this->_output->GetFetchObject()).GetTexHQ2xLUT(); break; case VideoFilterTypeID_HQ2XS: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ2xSFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ2xSFragShader_110, false, useShader150); currentHQnxLUT = ((const OGLClientFetchObject &)this->_output->GetFetchObject()).GetTexHQ2xLUT(); break; case VideoFilterTypeID_HQ3X: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ3xFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ3xFragShader_110, false, useShader150); currentHQnxLUT = ((const OGLClientFetchObject &)this->_output->GetFetchObject()).GetTexHQ3xLUT(); break; case VideoFilterTypeID_HQ3XS: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ3xSFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ3xSFragShader_110, false, useShader150); currentHQnxLUT = ((const OGLClientFetchObject &)this->_output->GetFetchObject()).GetTexHQ3xLUT(); break; case VideoFilterTypeID_HQ4X: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ4xFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ4xFragShader_110, false, useShader150); currentHQnxLUT = ((const OGLClientFetchObject &)this->_output->GetFetchObject()).GetTexHQ4xLUT(); break; case VideoFilterTypeID_HQ4XS: - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ4xSFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample3x3_VertShader_110, ScalerHQ4xSFragShader_110, false, useShader150); currentHQnxLUT = ((const OGLClientFetchObject &)this->_output->GetFetchObject()).GetTexHQ4xLUT(); break; @@ -6766,11 +6797,11 @@ bool OGLDisplayLayer::SetGPUPixelScalerOGL(const VideoFilterTypeID filterID) { if (shaderSupport >= ShaderSupport_MidTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler2xBRZFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler2xBRZFragShader_110, false, useShader150); } else if (shaderSupport >= ShaderSupport_LowTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, Scaler2xBRZFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, Scaler2xBRZFragShader_110, false, useShader150); } else { @@ -6783,11 +6814,11 @@ bool OGLDisplayLayer::SetGPUPixelScalerOGL(const VideoFilterTypeID filterID) { if (shaderSupport >= ShaderSupport_MidTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler3xBRZFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler3xBRZFragShader_110, false, useShader150); } else if (shaderSupport >= ShaderSupport_LowTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, Scaler3xBRZFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample4x4_VertShader_110, Scaler3xBRZFragShader_110, false, useShader150); } else { @@ -6800,7 +6831,7 @@ bool OGLDisplayLayer::SetGPUPixelScalerOGL(const VideoFilterTypeID filterID) { if (shaderSupport >= ShaderSupport_MidTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler4xBRZFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler4xBRZFragShader_110, false, useShader150); } else { @@ -6813,7 +6844,7 @@ bool OGLDisplayLayer::SetGPUPixelScalerOGL(const VideoFilterTypeID filterID) { if (shaderSupport >= ShaderSupport_MidTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler5xBRZFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler5xBRZFragShader_110, false, useShader150); } else { @@ -6826,7 +6857,7 @@ bool OGLDisplayLayer::SetGPUPixelScalerOGL(const VideoFilterTypeID filterID) { if (shaderSupport >= ShaderSupport_MidTier) { - shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler6xBRZFragShader_110, useShader150); + shaderFilterProgram->SetVertexAndFragmentShaderOGL(Sample5x5_VertShader_110, Scaler6xBRZFragShader_110, false, useShader150); } else { diff --git a/desmume/src/frontend/cocoa/OGLDisplayOutput.h b/desmume/src/frontend/cocoa/OGLDisplayOutput.h index 291e60c55..22f3aae37 100644 --- a/desmume/src/frontend/cocoa/OGLDisplayOutput.h +++ b/desmume/src/frontend/cocoa/OGLDisplayOutput.h @@ -106,10 +106,10 @@ public: ShaderSupportTier GetShaderSupport(); void SetShaderSupport(const ShaderSupportTier theTier); GLuint GetVertexShaderID(); - void SetVertexShaderOGL(const char *shaderProgram, bool useShader150); + void SetVertexShaderOGL(const char *shaderProgram, bool useVtxColors, bool useShader150); GLuint GetFragmentShaderID(); void SetFragmentShaderOGL(const char *shaderProgram, bool useShader150); - void SetVertexAndFragmentShaderOGL(const char *vertShaderProgram, const char *fragShaderProgram, bool useShader150); + void SetVertexAndFragmentShaderOGL(const char *vertShaderProgram, const char *fragShaderProgram, bool useVtxColors, bool useShader150); GLuint GetProgramID(); }; @@ -274,7 +274,8 @@ protected: GLint _uniformViewSize; GLuint _vaoMainStatesID; - GLuint _vboVertexID; + GLuint _vboPositionVertexID; + GLuint _vboColorVertexID; GLuint _vboTexCoordID; GLuint _vboElementID; GLuint _texCharMap; diff --git a/desmume/src/frontend/cocoa/cocoa_output.h b/desmume/src/frontend/cocoa/cocoa_output.h index 4a65b4d7a..d3b62b9fa 100644 --- a/desmume/src/frontend/cocoa/cocoa_output.h +++ b/desmume/src/frontend/cocoa/cocoa_output.h @@ -148,6 +148,12 @@ @property (assign) BOOL isHUDLagFrameCountVisible; @property (assign) BOOL isHUDCPULoadAverageVisible; @property (assign) BOOL isHUDRealTimeClockVisible; +@property (assign) uint32_t hudColorVideoFPS; +@property (assign) uint32_t hudColorRender3DFPS; +@property (assign) uint32_t hudColorFrameIndex; +@property (assign) uint32_t hudColorLagFrameCount; +@property (assign) uint32_t hudColorCPULoadAverage; +@property (assign) uint32_t hudColorRTC; @property (assign) NSInteger displayMainVideoSource; @property (assign) NSInteger displayTouchVideoSource; @property (assign) BOOL useVerticalSync; diff --git a/desmume/src/frontend/cocoa/cocoa_output.mm b/desmume/src/frontend/cocoa/cocoa_output.mm index 648affa24..ae35efe6d 100644 --- a/desmume/src/frontend/cocoa/cocoa_output.mm +++ b/desmume/src/frontend/cocoa/cocoa_output.mm @@ -741,6 +741,12 @@ @dynamic isHUDLagFrameCountVisible; @dynamic isHUDCPULoadAverageVisible; @dynamic isHUDRealTimeClockVisible; +@dynamic hudColorVideoFPS; +@dynamic hudColorRender3DFPS; +@dynamic hudColorFrameIndex; +@dynamic hudColorLagFrameCount; +@dynamic hudColorCPULoadAverage; +@dynamic hudColorRTC; @dynamic useVerticalSync; @dynamic videoFiltersPreferGPU; @dynamic sourceDeposterize; @@ -895,6 +901,102 @@ return theState; } +- (void) setHudColorVideoFPS:(uint32_t)theColor +{ + OSSpinLockLock(&spinlockIsHUDVisible); + _cdv->SetHUDColorVideoFPS(theColor); + OSSpinLockUnlock(&spinlockIsHUDVisible); +} + +- (uint32_t) hudColorVideoFPS +{ + OSSpinLockLock(&spinlockIsHUDVisible); + const uint32_t color32 = _cdv->GetHUDColorVideoFPS(); + OSSpinLockUnlock(&spinlockIsHUDVisible); + + return color32; +} + +- (void) setHudColorRender3DFPS:(uint32_t)theColor +{ + OSSpinLockLock(&spinlockIsHUDVisible); + _cdv->SetHUDColorRender3DFPS(theColor); + OSSpinLockUnlock(&spinlockIsHUDVisible); +} + +- (uint32_t) hudColorRender3DFPS +{ + OSSpinLockLock(&spinlockIsHUDVisible); + const uint32_t color32 = _cdv->GetHUDColorRender3DFPS(); + OSSpinLockUnlock(&spinlockIsHUDVisible); + + return color32; +} + +- (void) setHudColorFrameIndex:(uint32_t)theColor +{ + OSSpinLockLock(&spinlockIsHUDVisible); + _cdv->SetHUDColorFrameIndex(theColor); + OSSpinLockUnlock(&spinlockIsHUDVisible); +} + +- (uint32_t) hudColorFrameIndex +{ + OSSpinLockLock(&spinlockIsHUDVisible); + const uint32_t color32 = _cdv->GetHUDColorFrameIndex(); + OSSpinLockUnlock(&spinlockIsHUDVisible); + + return color32; +} + +- (void) setHudColorLagFrameCount:(uint32_t)theColor +{ + OSSpinLockLock(&spinlockIsHUDVisible); + _cdv->SetHUDColorLagFrameCount(theColor); + OSSpinLockUnlock(&spinlockIsHUDVisible); +} + +- (uint32_t) hudColorLagFrameCount +{ + OSSpinLockLock(&spinlockIsHUDVisible); + const uint32_t color32 = _cdv->GetHUDColorLagFrameCount(); + OSSpinLockUnlock(&spinlockIsHUDVisible); + + return color32; +} + +- (void) setHudColorCPULoadAverage:(uint32_t)theColor +{ + OSSpinLockLock(&spinlockIsHUDVisible); + _cdv->SetHUDColorCPULoadAverage(theColor); + OSSpinLockUnlock(&spinlockIsHUDVisible); +} + +- (uint32_t) hudColorCPULoadAverage +{ + OSSpinLockLock(&spinlockIsHUDVisible); + const uint32_t color32 = _cdv->GetHUDColorCPULoadAverage(); + OSSpinLockUnlock(&spinlockIsHUDVisible); + + return color32; +} + +- (void) setHudColorRTC:(uint32_t)theColor +{ + OSSpinLockLock(&spinlockIsHUDVisible); + _cdv->SetHUDColorRTC(theColor); + OSSpinLockUnlock(&spinlockIsHUDVisible); +} + +- (uint32_t) hudColorRTC +{ + OSSpinLockLock(&spinlockIsHUDVisible); + const uint32_t color32 = _cdv->GetHUDColorRTC(); + OSSpinLockUnlock(&spinlockIsHUDVisible); + + return color32; +} + - (void) setDisplayMainVideoSource:(NSInteger)displaySourceID { OSSpinLockLock(&spinlockDisplayVideoSource); diff --git a/desmume/src/frontend/cocoa/cocoa_util.h b/desmume/src/frontend/cocoa/cocoa_util.h index fe8eb3f97..de750d225 100644 --- a/desmume/src/frontend/cocoa/cocoa_util.h +++ b/desmume/src/frontend/cocoa/cocoa_util.h @@ -1,6 +1,6 @@ /* Copyright (C) 2011 Roger Manuel - Copyright (C) 2012-2013 DeSmuME team + Copyright (C) 2012-2017 DeSmuME team This file is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,6 +17,7 @@ */ #import +#import #include #include "utilities.h" @@ -40,6 +41,9 @@ + (NSInteger) getIBActionSenderTag:(id)sender; + (BOOL) getIBActionSenderButtonStateBool:(id)sender; ++ (NSColor *) NSColorFromRGBA8888:(uint32_t)theColor; ++ (uint32_t) RGBA8888FromNSColor:(NSColor *)theColor; + + (NSInteger) appVersionNumeric; + (NSString *) appInternalVersionString; + (NSString *) appInternalNameAndVersionString; @@ -90,3 +94,8 @@ - (void)postNotificationOnMainThreadName:(NSString *)aName object:(id)anObject userInfo:(NSDictionary *)aUserInfo; @end + +@interface RGBA8888ToNSColorValueTransformer : NSValueTransformer +{ } +@end + diff --git a/desmume/src/frontend/cocoa/cocoa_util.mm b/desmume/src/frontend/cocoa/cocoa_util.mm index a65537311..ece192fd0 100644 --- a/desmume/src/frontend/cocoa/cocoa_util.mm +++ b/desmume/src/frontend/cocoa/cocoa_util.mm @@ -1,6 +1,6 @@ /* Copyright (C) 2011 Roger Manuel - Copyright (C) 2012-2016 DeSmuME team + Copyright (C) 2012-2017 DeSmuME team This file is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -156,6 +156,36 @@ static NSDate *distantFutureDate = [[NSDate distantFuture] retain]; return theState; } ++ (NSColor *) NSColorFromRGBA8888:(uint32_t)theColor +{ + const CGFloat r = (CGFloat)((theColor >> 0) & 0xFF) / 255.0f; + const CGFloat g = (CGFloat)((theColor >> 8) & 0xFF) / 255.0f; + const CGFloat b = (CGFloat)((theColor >> 16) & 0xFF) / 255.0f; + const CGFloat a = (CGFloat)((theColor >> 24) & 0xFF) / 255.0f; + + return [NSColor colorWithDeviceRed:r green:g blue:b alpha:a]; +} + ++ (uint32_t) RGBA8888FromNSColor:(NSColor *)theColor +{ + if (![[theColor colorSpaceName] isEqualToString:NSDeviceRGBColorSpace]) + { + theColor = [theColor colorUsingColorSpaceName:NSDeviceRGBColorSpace]; + if (theColor == nil) + { + return 0x00000000; + } + } + + CGFloat r, g, b, a; + [theColor getRed:&r green:&g blue:&b alpha:&a]; + + return (((uint32_t)(r * 255.0f)) << 0) | + (((uint32_t)(g * 255.0f)) << 8) | + (((uint32_t)(b * 255.0f)) << 16) | + (((uint32_t)(a * 255.0f)) << 24); +} + + (NSInteger) appVersionNumeric { return (NSInteger)EMU_DESMUME_VERSION_NUMERIC(); @@ -352,3 +382,68 @@ static NSDate *distantFutureDate = [[NSDate distantFuture] retain]; } @end + +@implementation RGBA8888ToNSColorValueTransformer + ++ (Class)transformedValueClass +{ + return [NSColor class]; +} + ++ (BOOL)allowsReverseTransformation +{ + return YES; +} + +- (id)transformedValue:(id)value +{ + if (value == nil) + { + return nil; + } + + uint32_t color32 = 0xFFFFFFFF; + + if ([value respondsToSelector:@selector(unsignedIntegerValue)]) + { + color32 = (uint32_t)[value unsignedIntegerValue]; + } + else if ([value respondsToSelector:@selector(unsignedIntValue)]) + { + color32 = (uint32_t)[value unsignedIntValue]; + } + else if ([value respondsToSelector:@selector(integerValue)]) + { + color32 = (uint32_t)[value integerValue]; + } + else if ([value respondsToSelector:@selector(intValue)]) + { + color32 = (uint32_t)[value intValue]; + } + else + { + [NSException raise:NSInternalInconsistencyException format:@"Value (%@) does not respond to -unsignedIntegerValue, -unsignedIntValue, -integerValue or -intValue.", [value class]]; + } + + return [CocoaDSUtil NSColorFromRGBA8888:color32]; +} + +- (id)reverseTransformedValue:(id)value +{ + uint32_t color32 = 0xFFFFFFFF; + + if (value == nil) + { + return nil; + } + else if (![value isKindOfClass:[NSColor class]]) + { + NSLog(@"-reverseTransformedValue is %@", [value class]); + return [NSNumber numberWithUnsignedInteger:color32]; + } + + color32 = [CocoaDSUtil RGBA8888FromNSColor:(NSColor *)value]; + return [NSNumber numberWithUnsignedInteger:color32]; +} + +@end diff --git a/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.strings b/desmume/src/frontend/cocoa/translations/English.lproj/MainMenu.strings index cceb76865a7354ddfdec9ebd7058b202fe3475f5..beb7a1bc9b1dbc4211fc70dc23632d75d7e40d47 100644 GIT binary patch delta 217 zcmaE`K)hkOctZnx6ol=>F zrVE^6Wt%){gA{uJ14RDg2}bS738p5~7c?=mF=kGF$O%+_h?RxWWV&KCt0=PxgURGZ zR_W;p9!zY^nGC6u3%fO^HSGlH+VaqsS$cY$2NMSm P&~%0r1| YES - YES @@ -4092,7 +4091,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXAInputPrefsView - + 268 YES @@ -4108,6 +4107,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{13, 10}, {463, 396}} + YES @@ -4132,6 +4132,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{72, 43}, {84, 17}} + YES @@ -4151,6 +4152,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{44, 16}, {112, 17}} + YES @@ -4170,6 +4172,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{158, 37}, {126, 26}} + YES @@ -4263,6 +4266,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{289, 14}, {72, 22}} + YES @@ -4356,6 +4360,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{63, 69}, {93, 17}} + YES @@ -4375,6 +4380,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{158, 63}, {126, 26}} + YES @@ -4444,6 +4450,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{158, 11}, {126, 26}} + YES @@ -4546,11 +4553,13 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{1, 1}, {429, 97}} + {{6, 232}, {431, 113}} + {0, 0} @@ -4582,6 +4591,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{15, 16}, {126, 17}} + YES @@ -4601,6 +4611,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{339, 14}, {72, 22}} + YES -1804599231 @@ -4684,6 +4695,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{144, 10}, {189, 26}} + YES @@ -4707,6 +4719,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{305, 36}, {38, 11}} + YES @@ -4730,6 +4743,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{263, 36}, {38, 11}} + YES @@ -4749,6 +4763,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{220, 36}, {38, 11}} + YES @@ -4768,6 +4783,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{178, 36}, {38, 11}} + YES @@ -4787,6 +4803,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{137, 36}, {38, 11}} + YES @@ -4806,6 +4823,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{181, 82}, {175, 26}} + _NS:791 YES @@ -4896,6 +4914,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{181, 56}, {175, 26}} + _NS:791 YES @@ -4953,6 +4972,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{64, 88}, {115, 17}} + _NS:4068 YES @@ -4973,6 +4993,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{64, 62}, {114, 17}} + _NS:4068 YES @@ -4991,10 +5012,12 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{1, 1}, {429, 116}} + {{6, 5}, {431, 132}} + {0, 0} @@ -5026,6 +5049,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{223, 36}, {175, 26}} + _NS:791 YES @@ -5106,6 +5130,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{31, 42}, {190, 17}} + _NS:4068 YES @@ -5126,6 +5151,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{223, 10}, {175, 26}} + _NS:791 YES @@ -5206,6 +5232,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA268 {{32, 16}, {190, 17}} + _NS:4068 YES @@ -5224,11 +5251,13 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{1, 1}, {429, 71}} + _NS:21 {{6, 141}, {431, 87}} + _NS:18 {0, 0} @@ -5251,6 +5280,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {{10, 33}, {443, 350}} + Display Views @@ -5828,7 +5858,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA 268 - {{15, 283}, {131, 18}} + {{15, 278}, {131, 18}} _NS:682 YES @@ -5853,7 +5883,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA 268 - {{15, 263}, {174, 18}} + {{15, 251}, {174, 18}} _NS:682 YES @@ -5878,7 +5908,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA 268 - {{15, 243}, {148, 18}} + {{15, 224}, {148, 18}} _NS:682 YES @@ -5903,7 +5933,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA 268 - {{15, 223}, {147, 18}} + {{15, 197}, {147, 18}} _NS:682 YES @@ -5928,7 +5958,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA 268 - {{15, 163}, {103, 18}} + {{15, 104}, {103, 18}} _NS:682 YES @@ -5953,7 +5983,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA 268 - {{15, 183}, {171, 18}} + {{15, 143}, {171, 18}} _NS:682 YES @@ -5978,7 +6008,7 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA 268 - {{15, 203}, {184, 18}} + {{15, 170}, {184, 18}} _NS:682 YES @@ -6023,6 +6053,191 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA0 NO + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{233, 276}, {44, 23}} + + _NS:4132 + YES + NO + YES + + 1 + MSAxIDEAA + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{233, 249}, {44, 23}} + + _NS:4132 + YES + NO + YES + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{233, 222}, {44, 23}} + + _NS:4132 + YES + NO + YES + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{233, 195}, {44, 23}} + + _NS:4132 + YES + NO + YES + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{233, 168}, {44, 23}} + + _NS:4132 + YES + NO + YES + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{233, 141}, {44, 23}} + + _NS:4132 + YES + NO + YES + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{233, 102}, {44, 23}} + + _NS:4132 + NO + YES + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{233, 75}, {44, 23}} + + _NS:4132 + NO + YES + + + + + 268 + {{162.078125, 106}, {65.921875, 14}} + + _NS:4068 + YES + + 605028416 + 71435264 + Pending + + _NS:4068 + + + + + NO + 1 + + + + 268 + {{162, 79}, {65.921875, 14}} + + _NS:4068 + YES + + 605028416 + 71435264 + Applied + + _NS:4068 + + + + + NO + 1 + {{10, 33}, {443, 350}} @@ -6043,6 +6258,8 @@ L3d3dy5hZHZhbnNjZW5lLmNvbS9vZmZsaW5lL2RhdGFzL0FEVkFOc0NFbmVfUlRvb2xEUy56aXA {489, 420} + + NSView @@ -9679,6 +9896,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{12, 135}, {266, 17}} + YES 70254657 @@ -9698,6 +9916,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{13, 108}, {106, 18}} + _NS:682 YES @@ -9723,6 +9942,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 265 {{535, 7}, {96, 32}} + 1 YES @@ -9745,6 +9965,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 265 {{439, 7}, {96, 32}} + YES 67108864 @@ -9766,6 +9987,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 271 {{13, 50}, {614, 20}} + _NS:2202 YES @@ -9964,6 +10186,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{128, 104}, {300, 26}} + _NS:791 YES @@ -10086,6 +10309,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{26, 79}, {216, 14}} + _NS:4068 YES @@ -10109,6 +10333,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{247, 77}, {40, 19}} + _NS:817 YES @@ -10188,6 +10413,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{290, 71}, {90, 28}} + _NS:610 YES @@ -10209,6 +10435,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {640, 167} + _NS:122 {{0, 0}, {1920, 1177}} @@ -21434,7 +21661,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 279 2 - {{170, 35}, {194, 226}} + {{170, -54}, {227, 315}} -461896704 HUD Settings NSPanel @@ -21442,15 +21669,16 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {1.7976931348623157e+308, 1.7976931348623157e+308} - + 256 YES 268 - {{16, 119}, {99, 18}} + {{16, 194}, {99, 18}} + YES 67108864 @@ -21472,8 +21700,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 - {{16, 159}, {84, 18}} + {{16, 244}, {84, 18}} + YES -2080374784 @@ -21495,8 +21724,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 - {{16, 39}, {60, 18}} + {{16, 82}, {60, 18}} + YES 603979776 @@ -21518,8 +21748,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 - {{16, 139}, {121, 18}} + {{16, 219}, {121, 18}} + YES 67108864 @@ -21541,8 +21772,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 - {{16, 99}, {98, 18}} + {{16, 169}, {98, 18}} + YES 67108864 @@ -21564,8 +21796,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 - {{16, 59}, {121, 18}} + {{16, 119}, {121, 18}} + YES 67108864 @@ -21587,8 +21820,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 - {{17, 79}, {130, 18}} + {{17, 144}, {130, 18}} + YES 67108864 @@ -21610,8 +21844,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 - {{16, 11}, {162, 19}} + {{33, 18}, {162, 19}} + YES -2080374784 @@ -21631,8 +21866,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 - {{16, 190}, {167, 18}} + {{16, 279}, {167, 18}} + YES 67108864 @@ -21654,8 +21890,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 12 - {{12, 181}, {170, 5}} + {{12, 270}, {203, 5}} + {0, 0} 67108864 @@ -21670,8 +21907,202 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 0 NO + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{163, 241}, {44, 23}} + + + _NS:4132 + YES + NO + YES + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{163, 216}, {44, 23}} + + + _NS:4132 + YES + NO + YES + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{163, 191}, {44, 23}} + + + _NS:4132 + YES + NO + YES + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{163, 166}, {44, 23}} + + + _NS:4132 + YES + NO + YES + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{163, 141}, {44, 23}} + + + _NS:4132 + YES + NO + YES + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{163, 116}, {44, 23}} + + + _NS:4132 + YES + NO + YES + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{163, 79}, {44, 23}} + + + _NS:4132 + NO + YES + + + + + 268 + + YES + + YES + NSColor pasteboard type + + + {{163, 54}, {44, 23}} + + + _NS:4132 + NO + YES + + + + + 268 + {{108.8203125, 80}, {50, 17}} + + + _NS:4068 + YES + + 605028416 + 71566336 + Pending + + _NS:4068 + + + + + NO + 1 + + + + 268 + {{109, 54}, {50, 17}} + + + _NS:4068 + YES + + 605028416 + 71566336 + Applied + + _NS:4068 + + + + + NO + 1 + - {194, 226} + {227, 315} + + {{0, 0}, {1920, 1177}} {1.7976931348623157e+308, 1.7976931348623157e+308} @@ -21689,7 +22120,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {1.7976931348623157e+308, 1.7976931348623157e+308} - + 256 YES @@ -21698,6 +22129,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{21, 10}, {162, 19}} + YES -2080374784 @@ -21729,6 +22161,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{18, 14}, {132, 418}} + YES NO 21 @@ -22309,10 +22742,12 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{1, 1}, {168, 442}} + {{17, 33}, {170, 458}} + {0, 0} 67108864 @@ -22333,6 +22768,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{17, 717}, {124, 18}} + _NS:682 YES @@ -22368,6 +22804,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{15, 12}, {87, 18}} + _NS:682 YES @@ -22391,11 +22828,13 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{1, 1}, {168, 38}} + _NS:21 {{17, 657}, {170, 54}} + _NS:18 {0, 0} @@ -22427,6 +22866,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{18, 14}, {132, 118}} + _NS:736 YES NO @@ -22725,11 +23165,13 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{1, 1}, {168, 142}} + _NS:21 {{17, 495}, {170, 158}} + _NS:18 {0, 0} @@ -22748,6 +23190,8 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {204, 745} + + {{0, 0}, {1920, 1177}} {1.7976931348623157e+308, 1.7976931348623157e+308} @@ -22765,7 +23209,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {1.7976931348623157e+308, 1.7976931348623157e+308} - + 256 YES @@ -22784,6 +23228,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{15, 77}, {206, 18}} + YES -2080374784 @@ -22807,6 +23252,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{15, 15}, {109, 14}} + YES 68157504 @@ -22825,6 +23271,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{15, 57}, {115, 18}} + YES -2080374784 @@ -22848,6 +23295,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{15, 37}, {195, 18}} + YES -2080374784 @@ -22871,6 +23319,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{126, 10}, {96, 22}} + _NS:791 YES @@ -22993,10 +23442,12 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{1, 1}, {237, 102}} + {{17, 109}, {239, 118}} + {0, 0} 67108864 @@ -23017,6 +23468,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{56, 8}, {162, 19}} + YES -2080374784 @@ -23048,6 +23500,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{18, 14}, {107, 58}} + YES NO 3 @@ -23306,10 +23759,12 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{1, 1}, {237, 82}} + {{17, 424}, {239, 98}} + {0, 0} 67108864 @@ -23340,6 +23795,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{15, 52}, {108, 18}} + YES -2080374784 @@ -23363,6 +23819,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{15, 32}, {135, 18}} + YES -2080374784 @@ -23386,6 +23843,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{15, 12}, {82, 18}} + YES -2080374784 @@ -23409,6 +23867,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{32, 148}, {113, 14}} + _NS:526 {251, 750} YES @@ -23430,6 +23889,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{150, 146}, {48, 19}} + _NS:9 YES @@ -23507,6 +23967,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{203, 142}, {19, 27}} + _NS:1592 YES @@ -23526,6 +23987,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{15, 72}, {137, 18}} + YES 67108864 @@ -23549,6 +24011,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{6, 96}, {139, 14}} + YES 68157504 @@ -23567,6 +24030,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{203, 89}, {19, 27}} + YES 67895328 @@ -23586,6 +24050,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{163, 96}, {38, 14}} + _NS:4068 YES @@ -23662,6 +24127,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{41, 122}, {104, 14}} + _NS:4068 YES @@ -23682,6 +24148,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{147, 117}, {75, 22}} + _NS:791 YES @@ -23750,10 +24217,12 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{1, 1}, {237, 173}} + {{17, 231}, {239, 189}} + {0, 0} 67108864 @@ -23784,6 +24253,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{16, 32}, {192, 18}} + YES 67108864 @@ -23807,6 +24277,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 268 {{16, 12}, {114, 18}} + YES 67108864 @@ -23828,10 +24299,12 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {{1, 1}, {237, 58}} + {{17, 31}, {239, 74}} + {0, 0} 67108864 @@ -23849,6 +24322,8 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 {273, 542} + + {{0, 0}, {1920, 1177}} {1.7976931348623157e+308, 1.7976931348623157e+308} @@ -30501,6 +30976,12 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 mainWindow.view.isHUDLagFrameCountVisible mainWindow.view.isHUDRealTimeClockVisible mainWindow.view.isHUDCPULoadAverageVisible + mainWindow.view.hudColorVideoFPS + mainWindow.view.hudColorRender3DFPS + mainWindow.view.hudColorFrameIndex + mainWindow.view.hudColorLagFrameCount + mainWindow.view.hudColorCPULoadAverage + mainWindow.view.hudColorRTC EmuControllerDelegate @@ -30770,6 +31251,15 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 YES + + YES + HUD_Color_VideoFPS + HUD_Color_Render3DFPS + HUD_Color_FrameIndex + HUD_Color_LagFrameCount + HUD_Color_CPULoadAverage + HUD_Color_RTC + YES @@ -43775,6 +44265,222 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 10434 + + + value: selection.mainWindow.view.hudColorVideoFPS + + + + + + value: selection.mainWindow.view.hudColorVideoFPS + value + selection.mainWindow.view.hudColorVideoFPS + 2 + + + 10455 + + + + value: selection.mainWindow.view.hudColorRender3DFPS + + + + + + value: selection.mainWindow.view.hudColorRender3DFPS + value + selection.mainWindow.view.hudColorRender3DFPS + 2 + + + 10456 + + + + value: selection.mainWindow.view.hudColorFrameIndex + + + + + + value: selection.mainWindow.view.hudColorFrameIndex + value + selection.mainWindow.view.hudColorFrameIndex + 2 + + + 10457 + + + + value: selection.mainWindow.view.hudColorLagFrameCount + + + + + + value: selection.mainWindow.view.hudColorLagFrameCount + value + selection.mainWindow.view.hudColorLagFrameCount + 2 + + + 10458 + + + + value: selection.mainWindow.view.hudColorCPULoadAverage + + + + + + value: selection.mainWindow.view.hudColorCPULoadAverage + value + selection.mainWindow.view.hudColorCPULoadAverage + 2 + + + 10459 + + + + value: selection.mainWindow.view.hudColorRTC + + + + + + value: selection.mainWindow.view.hudColorRTC + value + selection.mainWindow.view.hudColorRTC + 2 + + + 10461 + + + + value: values.HUD_Color_VideoFPS + + + + + + value: values.HUD_Color_VideoFPS + value + values.HUD_Color_VideoFPS + + NSValueTransformerName + RGBA8888ToNSColorValueTransformer + + 2 + + + 10486 + + + + value: values.HUD_Color_Render3DFPS + + + + + + value: values.HUD_Color_Render3DFPS + value + values.HUD_Color_Render3DFPS + + NSValueTransformerName + RGBA8888ToNSColorValueTransformer + + 2 + + + 10487 + + + + value: values.HUD_Color_FrameIndex + + + + + + value: values.HUD_Color_FrameIndex + value + values.HUD_Color_FrameIndex + + NSValueTransformerName + RGBA8888ToNSColorValueTransformer + + 2 + + + 10488 + + + + value: values.HUD_Color_LagFrameCount + + + + + + value: values.HUD_Color_LagFrameCount + value + values.HUD_Color_LagFrameCount + + NSValueTransformerName + RGBA8888ToNSColorValueTransformer + + 2 + + + 10489 + + + + value: values.HUD_Color_CPULoadAverage + + + + + + value: values.HUD_Color_CPULoadAverage + value + values.HUD_Color_CPULoadAverage + + NSValueTransformerName + RGBA8888ToNSColorValueTransformer + + 2 + + + 10490 + + + + value: values.HUD_Color_RTC + + + + + + value: values.HUD_Color_RTC + value + values.HUD_Color_RTC + + NSValueTransformerName + RGBA8888ToNSColorValueTransformer + + 2 + + + 10491 + @@ -44316,6 +45022,16 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 + + + + + + + + + + @@ -58380,6 +59096,16 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 + + + + + + + + + + @@ -59555,6 +60281,142 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 + + 10437 + + + + + 10438 + + + + + 10439 + + + + + 10440 + + + + + 10441 + + + + + 10442 + + + + + 10443 + + + + + 10444 + + + + + 10445 + + + YES + + + + + + 10446 + + + + + 10447 + + + YES + + + + + + 10448 + + + + + 10462 + + + + + 10463 + + + + + 10464 + + + + + 10465 + + + + + 10466 + + + + + 10467 + + + + + 10468 + + + + + 10469 + + + + + 10470 + + + YES + + + + + + 10471 + + + + + 10472 + + + YES + + + + + + 10473 + + + @@ -59887,6 +60749,40 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 10423.IBPluginDependency 10424.IBPluginDependency 10436.IBPluginDependency + 10437.IBPluginDependency + 10437.IBViewBoundsToFrameTransform + 10438.IBPluginDependency + 10438.IBViewBoundsToFrameTransform + 10439.IBPluginDependency + 10439.IBViewBoundsToFrameTransform + 10440.IBPluginDependency + 10440.IBViewBoundsToFrameTransform + 10441.IBPluginDependency + 10441.IBViewBoundsToFrameTransform + 10442.IBPluginDependency + 10442.IBViewBoundsToFrameTransform + 10443.IBPluginDependency + 10443.IBViewBoundsToFrameTransform + 10444.IBPluginDependency + 10444.IBViewBoundsToFrameTransform + 10445.IBPluginDependency + 10445.IBViewBoundsToFrameTransform + 10446.IBPluginDependency + 10447.IBPluginDependency + 10448.IBPluginDependency + 10462.IBPluginDependency + 10463.IBPluginDependency + 10464.IBPluginDependency + 10465.IBPluginDependency + 10466.IBPluginDependency + 10467.IBPluginDependency + 10468.IBPluginDependency + 10469.IBPluginDependency + 10470.IBPluginDependency + 10470.IBViewBoundsToFrameTransform + 10471.IBPluginDependency + 10472.IBPluginDependency + 10473.IBPluginDependency 1113.IBPluginDependency 1114.IBPluginDependency 1115.IBPluginDependency @@ -62809,6 +63705,60 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + AUMjAABDsIAAA + + com.apple.InterfaceBuilder.CocoaPlugin + + AUMjAABDo4AAA + + com.apple.InterfaceBuilder.CocoaPlugin + + AUMjAABDloAAA + + com.apple.InterfaceBuilder.CocoaPlugin + + AUMjAABDiYAAA + + com.apple.InterfaceBuilder.CocoaPlugin + + AUMjAABDeQAAA + + com.apple.InterfaceBuilder.CocoaPlugin + + AUMjAABDXwAAA + + com.apple.InterfaceBuilder.CocoaPlugin + + AUMjAABDIAAAA + + com.apple.InterfaceBuilder.CocoaPlugin + + AUMoAABDWgAAA + + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABC3gAAwzEAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + P4AAAL+AAABDIhQAwuwAAA + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -62894,7 +63844,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{531, 244}, {489, 420}} + {{312, 104}, {489, 420}} {796.5, 896.5} com.apple.InterfaceBuilder.CocoaPlugin @@ -65204,9 +66154,9 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{703, 636}, {194, 226}} + {{312, 547}, {227, 315}} com.apple.InterfaceBuilder.CocoaPlugin - {{703, 636}, {194, 226}} + {{312, 547}, {227, 315}} YES @@ -66221,7 +67171,7 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 - 10436 + 10491 @@ -68965,6 +69915,14 @@ y7bMNcy1zTXNtc42zrbPN8+40DnQutE80b7SP9LB00TTxtRJ1MvVTtXR1lXW2Ndc1+DYZNjo2WzZ8dp2 AppKit.framework/Headers/NSCell.h + + NSColorWell + NSControl + + IBFrameworkSource + AppKit.framework/Headers/NSColorWell.h + + NSControl NSView diff --git a/desmume/src/frontend/cocoa/userinterface/DisplayWindowController.h b/desmume/src/frontend/cocoa/userinterface/DisplayWindowController.h index e96b26e93..965022026 100644 --- a/desmume/src/frontend/cocoa/userinterface/DisplayWindowController.h +++ b/desmume/src/frontend/cocoa/userinterface/DisplayWindowController.h @@ -58,6 +58,12 @@ class OGLVideoOutput; @property (assign) BOOL isHUDLagFrameCountVisible; @property (assign) BOOL isHUDCPULoadAverageVisible; @property (assign) BOOL isHUDRealTimeClockVisible; +@property (assign) NSColor *hudColorVideoFPS; +@property (assign) NSColor *hudColorRender3DFPS; +@property (assign) NSColor *hudColorFrameIndex; +@property (assign) NSColor *hudColorLagFrameCount; +@property (assign) NSColor *hudColorCPULoadAverage; +@property (assign) NSColor *hudColorRTC; @property (assign) NSInteger displayMainVideoSource; @property (assign) NSInteger displayTouchVideoSource; @property (assign) BOOL useVerticalSync; diff --git a/desmume/src/frontend/cocoa/userinterface/DisplayWindowController.mm b/desmume/src/frontend/cocoa/userinterface/DisplayWindowController.mm index f0c414f79..d9e61ce92 100644 --- a/desmume/src/frontend/cocoa/userinterface/DisplayWindowController.mm +++ b/desmume/src/frontend/cocoa/userinterface/DisplayWindowController.mm @@ -573,6 +573,13 @@ static std::unordered_map _screenMap; // [[self view] setIsHUDRealTimeClockVisible:[[NSUserDefaults standardUserDefaults] boolForKey:@"HUD_ShowRTC"]]; // TODO: Show HUD Input. //[[self view] setIsHUDInputVisible:[[NSUserDefaults standardUserDefaults] boolForKey:@"HUD_ShowInput"]]; + + [[self view] setHudColorVideoFPS:[CocoaDSUtil NSColorFromRGBA8888:[[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_VideoFPS"]]]; + [[self view] setHudColorRender3DFPS:[CocoaDSUtil NSColorFromRGBA8888:[[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_Render3DFPS"]]]; + [[self view] setHudColorFrameIndex:[CocoaDSUtil NSColorFromRGBA8888:[[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_FrameIndex"]]]; + [[self view] setHudColorLagFrameCount:[CocoaDSUtil NSColorFromRGBA8888:[[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_LagFrameCount"]]]; + [[self view] setHudColorCPULoadAverage:[CocoaDSUtil NSColorFromRGBA8888:[[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_CPULoadAverage"]]]; + [[self view] setHudColorRTC:[CocoaDSUtil NSColorFromRGBA8888:[[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_RTC"]]]; } - (BOOL) masterStatusBarState @@ -1076,6 +1083,13 @@ static std::unordered_map _screenMap; // // TODO: Show HUD Input. //[[NSUserDefaults standardUserDefaults] setBool:[[self view] isHUDInputVisible] forKey:@"HUD_ShowInput"]; + [[NSUserDefaults standardUserDefaults] setInteger:[CocoaDSUtil RGBA8888FromNSColor:[[self view] hudColorVideoFPS]] forKey:@"HUD_Color_VideoFPS"]; + [[NSUserDefaults standardUserDefaults] setInteger:[CocoaDSUtil RGBA8888FromNSColor:[[self view] hudColorRender3DFPS]] forKey:@"HUD_Color_Render3DFPS"]; + [[NSUserDefaults standardUserDefaults] setInteger:[CocoaDSUtil RGBA8888FromNSColor:[[self view] hudColorFrameIndex]] forKey:@"HUD_Color_FrameIndex"]; + [[NSUserDefaults standardUserDefaults] setInteger:[CocoaDSUtil RGBA8888FromNSColor:[[self view] hudColorLagFrameCount]] forKey:@"HUD_Color_LagFrameCount"]; + [[NSUserDefaults standardUserDefaults] setInteger:[CocoaDSUtil RGBA8888FromNSColor:[[self view] hudColorCPULoadAverage]] forKey:@"HUD_Color_CPULoadAverage"]; + [[NSUserDefaults standardUserDefaults] setInteger:[CocoaDSUtil RGBA8888FromNSColor:[[self view] hudColorRTC]] forKey:@"HUD_Color_RTC"]; + [[NSUserDefaults standardUserDefaults] synchronize]; } @@ -1668,6 +1682,12 @@ static std::unordered_map _screenMap; // @dynamic isHUDLagFrameCountVisible; @dynamic isHUDCPULoadAverageVisible; @dynamic isHUDRealTimeClockVisible; +@dynamic hudColorVideoFPS; +@dynamic hudColorRender3DFPS; +@dynamic hudColorFrameIndex; +@dynamic hudColorLagFrameCount; +@dynamic hudColorCPULoadAverage; +@dynamic hudColorRTC; @dynamic displayMainVideoSource; @dynamic displayTouchVideoSource; @dynamic useVerticalSync; @@ -1801,6 +1821,66 @@ static std::unordered_map _screenMap; // return [[self cdsVideoOutput] isHUDRealTimeClockVisible]; } +- (void) setHudColorVideoFPS:(NSColor *)theColor +{ + [[self cdsVideoOutput] setHudColorVideoFPS:[CocoaDSUtil RGBA8888FromNSColor:theColor]]; +} + +- (NSColor *) hudColorVideoFPS +{ + return [CocoaDSUtil NSColorFromRGBA8888:[[self cdsVideoOutput] hudColorVideoFPS]]; +} + +- (void) setHudColorRender3DFPS:(NSColor *)theColor +{ + [[self cdsVideoOutput] setHudColorRender3DFPS:[CocoaDSUtil RGBA8888FromNSColor:theColor]]; +} + +- (NSColor *) hudColorRender3DFPS +{ + return [CocoaDSUtil NSColorFromRGBA8888:[[self cdsVideoOutput] hudColorRender3DFPS]]; +} + +- (void) setHudColorFrameIndex:(NSColor *)theColor +{ + [[self cdsVideoOutput] setHudColorFrameIndex:[CocoaDSUtil RGBA8888FromNSColor:theColor]]; +} + +- (NSColor *) hudColorFrameIndex +{ + return [CocoaDSUtil NSColorFromRGBA8888:[[self cdsVideoOutput] hudColorFrameIndex]]; +} + +- (void) setHudColorLagFrameCount:(NSColor *)theColor +{ + [[self cdsVideoOutput] setHudColorLagFrameCount:[CocoaDSUtil RGBA8888FromNSColor:theColor]]; +} + +- (NSColor *) hudColorLagFrameCount +{ + return [CocoaDSUtil NSColorFromRGBA8888:[[self cdsVideoOutput] hudColorLagFrameCount]]; +} + +- (void) setHudColorCPULoadAverage:(NSColor *)theColor +{ + [[self cdsVideoOutput] setHudColorCPULoadAverage:[CocoaDSUtil RGBA8888FromNSColor:theColor]]; +} + +- (NSColor *) hudColorCPULoadAverage +{ + return [CocoaDSUtil NSColorFromRGBA8888:[[self cdsVideoOutput] hudColorCPULoadAverage]]; +} + +- (void) setHudColorRTC:(NSColor *)theColor +{ + [[self cdsVideoOutput] setHudColorRTC:[CocoaDSUtil RGBA8888FromNSColor:theColor]]; +} + +- (NSColor *) hudColorRTC +{ + return [CocoaDSUtil NSColorFromRGBA8888:[[self cdsVideoOutput] hudColorRTC]]; +} + - (void) setDisplayMainVideoSource:(NSInteger)displaySourceID { [[self cdsVideoOutput] setDisplayMainVideoSource:displaySourceID]; diff --git a/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayView.h b/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayView.h index 4823f437e..3b04ee064 100644 --- a/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayView.h +++ b/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayView.h @@ -166,6 +166,7 @@ typedef DisplayViewShaderProperties DisplayViewShaderProperties; id _displayVtxPositionBuffer; id _displayTexCoordBuffer; id _hudVtxPositionBuffer; + id _hudVtxColorBuffer; id _hudTexCoordBuffer; id bufCPUFilterSrcMain; id bufCPUFilterSrcTouch; diff --git a/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayView.mm b/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayView.mm index 54a6cbd9a..c0d0cfa4d 100644 --- a/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayView.mm +++ b/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayView.mm @@ -766,6 +766,7 @@ _displayVtxPositionBuffer = nil; _displayTexCoordBuffer = nil; _hudVtxPositionBuffer = nil; + _hudVtxColorBuffer = nil; _hudTexCoordBuffer = nil; _texDisplaySrcDeposterize[NDSDisplayID_Main][0] = nil; @@ -803,6 +804,7 @@ [_displayVtxPositionBuffer release]; [_displayTexCoordBuffer release]; [_hudVtxPositionBuffer release]; + [_hudVtxColorBuffer release]; [_hudTexCoordBuffer release]; [_texDisplaySrcDeposterize[NDSDisplayID_Main][0] release]; @@ -1049,6 +1051,7 @@ _displayVtxPositionBuffer = [[[self device] newBufferWithLength:(sizeof(float) * (4 * 8)) options:MTLResourceStorageModeManaged] retain]; _displayTexCoordBuffer = [[[self device] newBufferWithLength:(sizeof(float) * (4 * 8)) options:MTLResourceStorageModeManaged] retain]; _hudVtxPositionBuffer = [[[self device] newBufferWithLength:HUD_VERTEX_ATTRIBUTE_BUFFER_SIZE options:MTLResourceStorageModeManaged] retain]; + _hudVtxColorBuffer = [[[self device] newBufferWithLength:HUD_VERTEX_COLOR_ATTRIBUTE_BUFFER_SIZE options:MTLResourceStorageModeManaged] retain]; _hudTexCoordBuffer = [[[self device] newBufferWithLength:HUD_VERTEX_ATTRIBUTE_BUFFER_SIZE options:MTLResourceStorageModeManaged] retain]; DisplayViewShaderProperties *viewProps = (DisplayViewShaderProperties *)[_cdvPropertiesBuffer contents]; @@ -1188,7 +1191,7 @@ { for (size_t pixIndex = 0; pixIndex < tileSize; pixIndex++) { - const uint32_t colorRGBA8888 = 0x50000000; + const uint32_t colorRGBA8888 = 0xFFFFFFFF; charMapBuffer[(tileSize + pixIndex) + (rowIndex * (16 * tileSize))] = colorRGBA8888; } } @@ -1588,9 +1591,12 @@ { if (_cdv->HUDNeedsUpdate()) { - _cdv->SetHUDVertices((float)_cdv->GetViewProperties().clientWidth, (float)_cdv->GetViewProperties().clientHeight, (float *)[_hudVtxPositionBuffer contents]); + _cdv->SetHUDPositionVertices((float)_cdv->GetViewProperties().clientWidth, (float)_cdv->GetViewProperties().clientHeight, (float *)[_hudVtxPositionBuffer contents]); [_hudVtxPositionBuffer didModifyRange:NSMakeRange(0, sizeof(float) * hudLength * 8)]; + _cdv->SetHUDColorVertices((uint32_t *)[_hudVtxColorBuffer contents]); + [_hudVtxColorBuffer didModifyRange:NSMakeRange(0, sizeof(uint32_t) * hudLength * 4)]; + _cdv->SetHUDTextureCoordinates((float *)[_hudTexCoordBuffer contents]); [_hudTexCoordBuffer didModifyRange:NSMakeRange(0, sizeof(float) * hudLength * 8)]; @@ -1599,8 +1605,9 @@ [ce setRenderPipelineState:[sharedData hudPipeline]]; [ce setVertexBuffer:_hudVtxPositionBuffer offset:0 atIndex:0]; - [ce setVertexBuffer:_hudTexCoordBuffer offset:0 atIndex:1]; - [ce setVertexBuffer:_cdvPropertiesBuffer offset:0 atIndex:2]; + [ce setVertexBuffer:_hudVtxColorBuffer offset:0 atIndex:1]; + [ce setVertexBuffer:_hudTexCoordBuffer offset:0 atIndex:2]; + [ce setVertexBuffer:_cdvPropertiesBuffer offset:0 atIndex:3]; [ce setFragmentTexture:[self texHUDCharMap] atIndex:0]; // First, draw the backing text box. diff --git a/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayViewShaders.metal b/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayViewShaders.metal index a1f0edea6..887d102c8 100644 --- a/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayViewShaders.metal +++ b/desmume/src/frontend/cocoa/userinterface/MacMetalDisplayViewShaders.metal @@ -23,6 +23,7 @@ using namespace metal; struct HUDVtx { float4 position [[position]]; + float4 color; float2 texCoord; bool isBox; bool lowerHUDMipMapLevel; @@ -143,15 +144,17 @@ float dist_EPXPlus(const float3 pixA, const float3 pixB) #pragma mark HUD Shader Functions vertex HUDVtx hud_vertex(const device float2 *inPosition [[buffer(0)]], - const device float2 *inTexCoord [[buffer(1)]], - const constant DisplayViewShaderProperties &viewProps [[buffer(2)]], + const device uint32_t *inColor [[buffer(1)]], + const device float2 *inTexCoord [[buffer(2)]], + const constant DisplayViewShaderProperties &viewProps [[buffer(3)]], const uint vid [[vertex_id]]) { - const float2x2 projection = float2x2( float2(2.0/viewProps.width, 0.0), - float2( 0.0, 2.0/viewProps.height)); + const float2x2 projection = float2x2( float2(2.0f/viewProps.width, 0.0f), + float2( 0.0f, 2.0f/viewProps.height)); HUDVtx outVtx; - outVtx.position = float4(projection * inPosition[vid], 0.0, 1.0); + outVtx.position = float4(projection * inPosition[vid], 0.0f, 1.0f); + outVtx.color = float4( (float)((inColor[vid] >> 0) & 0xFF) / 255.0f, (float)((inColor[vid] >> 8) & 0xFF) / 255.0f, (float)((inColor[vid] >> 16) & 0xFF) / 255.0f, (float)((inColor[vid] >> 24) & 0xFF) / 255.0f ); outVtx.texCoord = inTexCoord[vid]; outVtx.isBox = (vid < 4); outVtx.lowerHUDMipMapLevel = (viewProps.lowerHUDMipMapLevel == 1); @@ -163,7 +166,7 @@ fragment float4 hud_fragment(const HUDVtx vtx [[stage_in]], const texture2d tex [[texture(0)]], const sampler samp [[sampler(0)]]) { - return tex.sample(samp, vtx.texCoord, (vtx.lowerHUDMipMapLevel) ? level(-0.50f) : level(0.00f)); + return tex.sample(samp, vtx.texCoord, (vtx.lowerHUDMipMapLevel) ? level(-0.50f) : level(0.00f)) * vtx.color; } #pragma mark Output Filters @@ -173,19 +176,19 @@ vertex DisplayVtx display_output_vertex(const device float2 *inPosition [[buffer const constant DisplayViewShaderProperties &viewProps [[buffer(2)]], const uint vid [[vertex_id]]) { - const float angleRadians = viewProps.rotation * (M_PI_F/180.0); + const float angleRadians = viewProps.rotation * (M_PI_F/180.0f); - const float2x2 projection = float2x2( float2(2.0/viewProps.width, 0.0), - float2( 0.0, 2.0/viewProps.height)); + const float2x2 projection = float2x2( float2(2.0f/viewProps.width, 0.0f), + float2( 0.0f, 2.0f/viewProps.height)); const float2x2 rotation = float2x2( float2( cos(angleRadians), sin(angleRadians)), float2(-sin(angleRadians), cos(angleRadians))); - const float2x2 scale = float2x2( float2(viewProps.viewScale, 0.0), - float2( 0.0, viewProps.viewScale)); + const float2x2 scale = float2x2( float2(viewProps.viewScale, 0.0f), + float2( 0.0f, viewProps.viewScale)); DisplayVtx outVtx; - outVtx.position = float4(projection * rotation * scale * inPosition[vid], 0.0, 1.0); + outVtx.position = float4(projection * rotation * scale * inPosition[vid], 0.0f, 1.0f); outVtx.texCoord = inTexCoord[vid]; return outVtx; @@ -196,19 +199,19 @@ vertex DisplayVtx display_output_bicubic_vertex(const device float2 *inPosition const constant DisplayViewShaderProperties &viewProps [[buffer(2)]], const uint vid [[vertex_id]]) { - const float angleRadians = viewProps.rotation * (M_PI_F/180.0); + const float angleRadians = viewProps.rotation * (M_PI_F/180.0f); - const float2x2 projection = float2x2( float2(2.0/viewProps.width, 0.0), - float2( 0.0, 2.0/viewProps.height)); + const float2x2 projection = float2x2( float2(2.0f/viewProps.width, 0.0f), + float2( 0.0f, 2.0f/viewProps.height)); const float2x2 rotation = float2x2( float2( cos(angleRadians), sin(angleRadians)), float2(-sin(angleRadians), cos(angleRadians))); - const float2x2 scale = float2x2( float2(viewProps.viewScale, 0.0), - float2( 0.0, viewProps.viewScale)); + const float2x2 scale = float2x2( float2(viewProps.viewScale, 0.0f), + float2( 0.0f, viewProps.viewScale)); DisplayVtx outVtx; - outVtx.position = float4(projection * rotation * scale * inPosition[vid], 0.0, 1.0); + outVtx.position = float4(projection * rotation * scale * inPosition[vid], 0.0f, 1.0f); outVtx.texCoord = floor(inTexCoord[vid] - 0.5f) + 0.5f; return outVtx; @@ -2666,8 +2669,6 @@ kernel void pixel_scaler_6xBRZ(const uint2 inPosition [[thread_position_in_grid] src[0] }; - //float3 dst[36] = {src[0]}; - // Scale pixel if (IsBlendingNeeded(blendResult)) { diff --git a/desmume/src/frontend/cocoa/userinterface/appDelegate.mm b/desmume/src/frontend/cocoa/userinterface/appDelegate.mm index e50c3d39b..597ce04a3 100644 --- a/desmume/src/frontend/cocoa/userinterface/appDelegate.mm +++ b/desmume/src/frontend/cocoa/userinterface/appDelegate.mm @@ -85,6 +85,9 @@ isDeveloperPlusBuild = NO; #endif + RGBA8888ToNSColorValueTransformer *nsColorTransformer = [[[RGBA8888ToNSColorValueTransformer alloc] init] autorelease]; + [NSValueTransformer setValueTransformer:nsColorTransformer forName:@"RGBA8888ToNSColorValueTransformer"]; + return self; } @@ -607,6 +610,13 @@ // TODO: Show HUD Input. //const BOOL hudShowInput = [(NSNumber *)[windowProperties valueForKey:@"hudShowInput"] boolValue]; + const NSUInteger hudColorVideoFPS = ([windowProperties objectForKey:@"hudColorVideoFPS"] != nil) ? [(NSNumber *)[windowProperties valueForKey:@"hudColorVideoFPS"] unsignedIntegerValue] : [[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_VideoFPS"]; + const NSUInteger hudColorRender3DFPS = ([windowProperties objectForKey:@"hudColorRender3DFPS"] != nil) ? [(NSNumber *)[windowProperties valueForKey:@"hudColorRender3DFPS"] unsignedIntegerValue] : [[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_Render3DFPS"]; + const NSUInteger hudColorFrameIndex = ([windowProperties objectForKey:@"hudColorFrameIndex"] != nil) ? [(NSNumber *)[windowProperties valueForKey:@"hudColorFrameIndex"] unsignedIntegerValue] : [[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_FrameIndex"]; + const NSUInteger hudColorLagFrameCount = ([windowProperties objectForKey:@"hudColorLagFrameCount"] != nil) ? [(NSNumber *)[windowProperties valueForKey:@"hudColorLagFrameCount"] unsignedIntegerValue] : [[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_LagFrameCount"]; + const NSUInteger hudColorCPULoadAverage = ([windowProperties objectForKey:@"hudColorCPULoadAverage"] != nil) ? [(NSNumber *)[windowProperties valueForKey:@"hudColorCPULoadAverage"] unsignedIntegerValue] : [[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_CPULoadAverage"]; + const NSUInteger hudColorRTC = ([windowProperties objectForKey:@"hudColorRTC"] != nil) ? [(NSNumber *)[windowProperties valueForKey:@"hudColorRTC"] unsignedIntegerValue] : [[NSUserDefaults standardUserDefaults] integerForKey:@"HUD_Color_RTC"]; + const NSInteger screenshotFileFormat = ([windowProperties objectForKey:@"screenshotFileFormat"] != nil) ? [(NSNumber *)[windowProperties valueForKey:@"screenshotFileFormat"] integerValue] : NSTIFFFileType; const BOOL useVerticalSync = ([windowProperties objectForKey:@"useVerticalSync"] != nil) ? [(NSNumber *)[windowProperties valueForKey:@"useVerticalSync"] boolValue] : YES; const BOOL isMinSizeNormal = ([windowProperties objectForKey:@"isMinSizeNormal"] != nil) ? [(NSNumber *)[windowProperties valueForKey:@"isMinSizeNormal"] boolValue] : YES; @@ -652,6 +662,13 @@ [[windowController view] setIsHUDCPULoadAverageVisible:hudShowCPULoadAverage]; [[windowController view] setIsHUDRealTimeClockVisible:hudShowRTC]; + [[windowController view] setHudColorVideoFPS:[CocoaDSUtil NSColorFromRGBA8888:(uint32_t)hudColorVideoFPS]]; + [[windowController view] setHudColorRender3DFPS:[CocoaDSUtil NSColorFromRGBA8888:(uint32_t)hudColorRender3DFPS]]; + [[windowController view] setHudColorFrameIndex:[CocoaDSUtil NSColorFromRGBA8888:(uint32_t)hudColorFrameIndex]]; + [[windowController view] setHudColorLagFrameCount:[CocoaDSUtil NSColorFromRGBA8888:(uint32_t)hudColorLagFrameCount]]; + [[windowController view] setHudColorCPULoadAverage:[CocoaDSUtil NSColorFromRGBA8888:(uint32_t)hudColorCPULoadAverage]]; + [[windowController view] setHudColorRTC:[CocoaDSUtil NSColorFromRGBA8888:(uint32_t)hudColorRTC]]; + [[windowController masterWindow] setFrameOrigin:NSMakePoint(frameX, frameY)]; // If this is the last window in the list, make this window key and main. @@ -723,6 +740,12 @@ [NSNumber numberWithBool:[[windowController view] isHUDLagFrameCountVisible]], @"hudShowLagFrameCount", [NSNumber numberWithBool:[[windowController view] isHUDCPULoadAverageVisible]], @"hudShowCPULoadAverage", [NSNumber numberWithBool:[[windowController view] isHUDRealTimeClockVisible]], @"hudShowRTC", + [NSNumber numberWithUnsignedInteger:[CocoaDSUtil RGBA8888FromNSColor:[[windowController view] hudColorVideoFPS]]], @"hudColorVideoFPS", + [NSNumber numberWithUnsignedInteger:[CocoaDSUtil RGBA8888FromNSColor:[[windowController view] hudColorRender3DFPS]]], @"hudColorRender3DFPS", + [NSNumber numberWithUnsignedInteger:[CocoaDSUtil RGBA8888FromNSColor:[[windowController view] hudColorFrameIndex]]], @"hudColorFrameIndex", + [NSNumber numberWithUnsignedInteger:[CocoaDSUtil RGBA8888FromNSColor:[[windowController view] hudColorLagFrameCount]]], @"hudColorLagFrameCount", + [NSNumber numberWithUnsignedInteger:[CocoaDSUtil RGBA8888FromNSColor:[[windowController view] hudColorCPULoadAverage]]], @"hudColorCPULoadAverage", + [NSNumber numberWithUnsignedInteger:[CocoaDSUtil RGBA8888FromNSColor:[[windowController view] hudColorRTC]]], @"hudColorRTC", [NSNumber numberWithBool:[windowController isMinSizeNormal]], @"isMinSizeNormal", [NSNumber numberWithBool:[windowController masterStatusBarState]], @"isShowingStatusBar", [NSNumber numberWithBool:[windowController isFullScreen]], @"isInFullScreenMode",