Inlined desmume_cycle() and desmume_running() for speed.

This commit is contained in:
Luigi__ 2009-04-02 20:25:45 +00:00
parent 8009863daa
commit 4d6ac95a44
2 changed files with 11 additions and 7 deletions

View File

@ -100,12 +100,12 @@ void desmume_toggle()
{
execute = (execute) ? FALSE : TRUE;
}
BOOL desmume_running()
/*INLINE BOOL desmume_running()
{
return execute;
}
}*/
void desmume_cycle()
INLINE void desmume_cycle()
{
u16 keypad;
/* Joystick events */
@ -141,8 +141,6 @@ gboolean EmuLoop(gpointer data)
{
static int limiter_frame_counter = 0;
ticksCurFrame = SDL_GetTicks();
fps_FrameCount += Frameskip + 1;
if(!fps_SecStart) fps_SecStart = SDL_GetTicks();
if(SDL_GetTicks() - fps_SecStart >= 1000)
@ -165,6 +163,8 @@ gboolean EmuLoop(gpointer data)
gtk_widget_queue_draw(pDrawingArea);
gtk_widget_queue_draw(pDrawingArea2);
ticksCurFrame = SDL_GetTicks();
if(!glade_fps_limiter_disabled)
{
while((ticksCurFrame - ticksPrevFrame) < TICKS_PER_FRAME)

View File

@ -38,8 +38,12 @@ extern void desmume_pause( void);
extern void desmume_resume( void);
extern void desmume_reset( void);
extern void desmume_toggle( void);
extern BOOL desmume_running( void);
//extern BOOL desmume_running( void);
INLINE BOOL desmume_running(void)
{
return execute;
}
extern void desmume_cycle( void);
extern INLINE void desmume_cycle( void);
#endif /*__DESMUME_H__*/