File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -366,6 +366,7 @@ static void gfx_widget_screenshot_iterate(
366366 /* Load screenshot and start its animation */
367367 if (state -> filename [0 ] != '\0' )
368368 {
369+ video_driver_state_t * video_st = video_state_get_ptr ();
369370 gfx_timer_ctx_entry_t timer ;
370371
371372 video_driver_texture_unload (& state -> texture );
@@ -397,17 +398,12 @@ static void gfx_widget_screenshot_iterate(
397398 state -> thumbnail_height = state -> texture_height * state -> scale_factor ;
398399
399400 /* Set image aspect ratio according to core geometry */
400- if (state -> state_slot )
401+ if (video_st && video_st -> av_info . geometry . aspect_ratio > 0 )
401402 {
402- video_driver_state_t * video_st = video_state_get_ptr ();
403-
404- if (video_st && video_st -> av_info .geometry .aspect_ratio > 0 )
405- {
406- float thumbnail_aspect = (float )state -> texture_width / (float )state -> texture_height ;
407- float core_aspect = video_st -> av_info .geometry .aspect_ratio ;
403+ float thumbnail_aspect = (float )state -> texture_width / (float )state -> texture_height ;
404+ float core_aspect = video_st -> av_info .geometry .aspect_ratio ;
408405
409- state -> thumbnail_width = state -> thumbnail_width / (thumbnail_aspect / core_aspect );
410- }
406+ state -> thumbnail_width = state -> thumbnail_width / (thumbnail_aspect / core_aspect );
411407 }
412408
413409 state -> shotname_length = (width - state -> thumbnail_width - padding * 2 ) / font_regular -> glyph_width ;
You can’t perform that action at this time.
0 commit comments