comparison render_sdl.c @ 1975:3701517d852c

Avoid expensive re-init from switching to external sync after render_init has been called
author Michael Pavone <pavone@retrodev.com>
date Fri, 08 May 2020 16:52:32 -0700
parents bd70f1e15684
children f3cca4b3f17a
comparison
equal deleted inserted replaced
1974:04b79a725b7f 1975:3701517d852c
263 static uint8_t external_sync; 263 static uint8_t external_sync;
264 void render_set_external_sync(uint8_t ext_sync_on) 264 void render_set_external_sync(uint8_t ext_sync_on)
265 { 265 {
266 if (ext_sync_on != external_sync) { 266 if (ext_sync_on != external_sync) {
267 external_sync = ext_sync_on; 267 external_sync = ext_sync_on;
268 render_config_updated(); 268 if (windowed_width) {
269 //only do this if render_init has already been called
270 render_config_updated();
271 }
269 } 272 }
270 } 273 }
271 274
272 #ifndef DISABLE_OPENGL 275 #ifndef DISABLE_OPENGL
273 static GLuint textures[3], buffers[2], vshader, fshader, program, un_textures[2], un_width, un_height, at_pos; 276 static GLuint textures[3], buffers[2], vshader, fshader, program, un_textures[2], un_width, un_height, at_pos;