Skip to content
  • DarkGod's avatar
    Merge branch 'screenshot-issues' into 'master' · f036030a
    DarkGod authored
    Screenshot issue fixes
    
    1. Fix save dialog appearing in savefile screenshot.  
    Don't swap buffers when rendering for screenshots, since glReadPixels reads the back buffer.
    
    1. Fix positioning for savefile screenshot.  
    Needed to flip the Y-coordinate due to coordinate system differences between SDL and OpenGL.
    
    1. Fix to not gamma adjust pixels of savefile screenshots when using shaders.  
    Savefile screenshots looked to bright on the load game dialog because the pixels were saved with the gamma already applied.  The gamma got applied again when displayed.
    
        Note: There is a lingering gamma adjustment made in game/modules/tome/class/Game.lua with the comment "Reset gamma setting, something somewhere is disrupting it, this is a stop gap solution".  I left this adjustment in when not doing a savefile screenshot, although I don't see why it's necessary.
    
    1. Simplify SDL gamma calculation and restore default gamma on exit.  
    When testing with sh...
    f036030a