Skip to content

Commit 42d3fd9

Browse files
committed
Cleanups
1 parent f7d62a2 commit 42d3fd9

6 files changed

Lines changed: 6 additions & 45 deletions

File tree

src/emu/machine.c

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// license:BSD-3-Clause
1+
u/ license:BSD-3-Clause
22
// copyright-holders:Aaron Giles
33
/***************************************************************************
44
@@ -370,24 +370,7 @@ int running_machine::run(bool firstrun)
370370
// run the CPUs until a reset or exit
371371
m_hard_reset_pending = false;
372372
while ((!m_hard_reset_pending && !m_exit_pending) || m_saveload_schedule != SLS_NONE)
373-
{
374-
375-
#ifdef __LIBRETRO__
376-
//break out to LIBRETRO LOOP
377-
return 0;
378-
#endif
379-
// execute CPUs if not paused
380-
if (!m_paused)
381-
m_scheduler.timeslice();
382-
383-
// otherwise, just pump video updates through
384-
else
385-
m_video->frame_update();
386-
387-
// handle save/load
388-
if (m_saveload_schedule != SLS_NONE)
389-
handle_saveload();
390-
}
373+
return 0;
391374

392375
// and out via the exit phase
393376
m_current_phase = MACHINE_PHASE_EXIT;
@@ -410,8 +393,6 @@ int running_machine::run(bool firstrun)
410393
return error;
411394
}
412395

413-
#ifdef __LIBRETRO__
414-
415396
extern void retro_finish();
416397
extern int RLOOP;
417398
extern int ENDEXEC;
@@ -435,10 +416,8 @@ void running_machine::retro_machineexit(){
435416

436417
void running_machine::retro_loop(){
437418

438-
while (RLOOP==1) {
439-
440-
//manager().web()->serve();
441-
419+
while (RLOOP==1)
420+
{
442421
// execute CPUs if not paused
443422
if (!m_paused)
444423
m_scheduler.timeslice();
@@ -475,8 +454,6 @@ void running_machine::retro_loop(){
475454

476455
}
477456

478-
#endif
479-
480457
//-------------------------------------------------
481458
// schedule_exit - schedule a clean exit
482459
//-------------------------------------------------

src/emu/machine.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,8 @@ class running_machine
197197
// configuration helpers
198198
device_t &add_dynamic_device(device_t &owner, device_type type, const char *tag, UINT32 clock);
199199

200-
#ifdef __LIBRETRO__
201-
void retro_machineexit();
202-
void retro_loop();
203-
#endif
200+
void retro_machineexit();
201+
void retro_loop();
204202
// immediate operations
205203
int run(bool firstrun);
206204
void pause();

src/emu/video.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
// GLOBAL VARIABLES
3030
//**************************************************************************
3131

32-
void retro_switch_to_main_thread();
3332
extern render_target *our_target;
3433
extern int mame_reset;
3534
extern int retro_pause;
@@ -200,8 +199,6 @@ void video_manager::frame_update(bool debug)
200199
if (machine().first_screen() != NULL && (machine().paused() || debug || debugger_within_instruction_hook(machine())))
201200
machine().first_screen()->reset_partial_updates();
202201
}
203-
204-
retro_switch_to_main_thread();
205202
}
206203

207204

src/osd/retro/libretro.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -636,11 +636,6 @@ void retro_cheat_reset(void) {}
636636
void retro_cheat_set(unsigned unused, bool unused1, const char* unused2) {}
637637
void retro_set_controller_port_device(unsigned in_port, unsigned device) {}
638638

639-
void retro_switch_to_main_thread(void)
640-
{
641-
642-
}
643-
644639
void *retro_get_fb_ptr(void)
645640
{
646641
return videoBuffer;

src/osd/retro/libretro_shared.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ static const char core[] = "mame2014";
7777
extern retro_log_printf_t log_cb;
7878
extern retro_input_state_t input_state_cb;
7979

80-
void retro_switch_to_main_thread(void);
81-
8280
void retro_frame_draw_enable(bool enable);
8381

8482
void *retro_get_fb_ptr(void);

src/osd/retro/retromain.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2195,10 +2195,6 @@ void retro_osd_interface::init(running_machine &machine)
21952195

21962196
if (log_cb)
21972197
log_cb(RETRO_LOG_INFO, "OSD initialization complete\n");
2198-
2199-
// retro_switch_to_main_thread();
2200-
2201-
22022198
}
22032199

22042200
void retro_osd_interface::update(bool skip_redraw, UINT32 flags)

0 commit comments

Comments
 (0)