Skip to content

Commit

Permalink
- Blind attempt at fixing wrong mouse position in OpenGLFrameBuffer a…
Browse files Browse the repository at this point in the history
…nd OpenGLSWFrameBuffer
  • Loading branch information
drfrag666 committed Mar 6, 2020
1 parent 5946744 commit d8d72f5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/gl/system/gl_framebuffer.cpp
Expand Up @@ -560,6 +560,7 @@ void OpenGLFrameBuffer::ScaleCoordsFromWindow(int16_t &x, int16_t &y)
int letterboxWidth = GLRenderer->mOutputLetterbox.width;
int letterboxHeight = GLRenderer->mOutputLetterbox.height;

SDLGLFB::ScaleCoordsFromWindow(x,y);
// Subtract the LB video mode letterboxing
if (IsFullscreen())
y -= (GetTrueHeight() - VideoHeight) / 2;
Expand Down
1 change: 1 addition & 0 deletions src/gl/system/gl_swframebuffer.cpp
Expand Up @@ -3818,6 +3818,7 @@ void OpenGLSWFrameBuffer::ScaleCoordsFromWindow(int16_t &x, int16_t &y)
int letterboxX, letterboxY, letterboxWidth, letterboxHeight;
GetLetterboxFrame(letterboxX, letterboxY, letterboxWidth, letterboxHeight);

SDLGLFB::ScaleCoordsFromWindow(x,y);
// Subtract the LB video mode letterboxing
if (IsFullscreen())
y -= (GetTrueHeight() - VideoHeight) / 2;
Expand Down

0 comments on commit d8d72f5

Please sign in to comment.