File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -793,16 +793,16 @@ def test_SDL_GetSetWindowGammaRamp(window):
793
793
vals = (Uint16 * 256 )()
794
794
pixels .SDL_CalculateGammaRamp (0.5 , vals )
795
795
ret = sdl2 .SDL_SetWindowGammaRamp (window , vals , vals , vals )
796
- assert ret == 0 , _check_error_msg ()
797
- r = (Uint16 * 256 )()
798
- g = (Uint16 * 256 )()
799
- b = (Uint16 * 256 )()
800
- ret = sdl2 .SDL_GetWindowGammaRamp (window , r , g , b )
801
- assert ret == 0 , _check_error_msg ()
802
- for i in range (len (vals )):
803
- assert r [i ] == vals [i ]
804
- assert g [i ] == vals [i ]
805
- assert b [i ] == vals [i ]
796
+ if ret == 0 :
797
+ r = (Uint16 * 256 )()
798
+ g = (Uint16 * 256 )()
799
+ b = (Uint16 * 256 )()
800
+ ret = sdl2 .SDL_GetWindowGammaRamp (window , r , g , b )
801
+ assert ret == 0 , _check_error_msg ()
802
+ for i in range (len (vals )):
803
+ assert r [i ] == vals [i ]
804
+ assert g [i ] == vals [i ]
805
+ assert b [i ] == vals [i ]
806
806
807
807
@pytest .mark .skip ("not implemented" )
808
808
@pytest .mark .skipif (sdl2 .dll .version < 2004 , reason = "not available" )
You can’t perform that action at this time.
0 commit comments