comparison sms.c @ 1688:395f684c5379

Fixed the most glaring issues in libretro build
author Mike Pavone <pavone@retrodev.com>
date Sun, 20 Jan 2019 16:24:22 -0800
parents 6909c5d0bbb5
children 319d90025d50
comparison
equal deleted inserted replaced
1687:6c54bb5fe3b3 1688:395f684c5379
384 vdp_adjust_cycles(sms->vdp, adjust); 384 vdp_adjust_cycles(sms->vdp, adjust);
385 sms->psg->cycles -= adjust; 385 sms->psg->cycles -= adjust;
386 target_cycle -= adjust; 386 target_cycle -= adjust;
387 } 387 }
388 } 388 }
389 #ifndef IS_LIB
389 bindings_release_capture(); 390 bindings_release_capture();
390 vdp_release_framebuffer(sms->vdp); 391 vdp_release_framebuffer(sms->vdp);
391 render_pause_source(sms->psg->audio); 392 render_pause_source(sms->psg->audio);
393 #endif
392 sms->should_return = 0; 394 sms->should_return = 0;
393 } 395 }
394 396
395 static void resume_sms(system_header *system) 397 static void resume_sms(system_header *system)
396 { 398 {
397 sms_context *sms = (sms_context *)system; 399 sms_context *sms = (sms_context *)system;
400 #ifndef IS_LIB
398 bindings_reacquire_capture(); 401 bindings_reacquire_capture();
399 vdp_reacquire_framebuffer(sms->vdp); 402 vdp_reacquire_framebuffer(sms->vdp);
400 render_resume_source(sms->psg->audio); 403 render_resume_source(sms->psg->audio);
404 #endif
401 run_sms(system); 405 run_sms(system);
402 } 406 }
403 407
404 static void start_sms(system_header *system, char *statefile) 408 static void start_sms(system_header *system, char *statefile)
405 { 409 {
444 448
445 static void request_exit(system_header *system) 449 static void request_exit(system_header *system)
446 { 450 {
447 sms_context *sms = (sms_context *)system; 451 sms_context *sms = (sms_context *)system;
448 sms->should_return = 1; 452 sms->should_return = 1;
453 sms->z80->target_cycle = sms->z80->sync_cycle = sms->z80->current_cycle;
449 } 454 }
450 455
451 static void inc_debug_mode(system_header *system) 456 static void inc_debug_mode(system_header *system)
452 { 457 {
453 sms_context *sms = (sms_context *)system; 458 sms_context *sms = (sms_context *)system;