1
0
Fork 0
forked from len0rd/rockbox

Automatic cpu boosting when emulating, when supported

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6111 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michiel Van Der Kolk 2005-03-03 13:11:45 +00:00
parent fdcb5f04de
commit 0cecadd074

View file

@ -66,12 +66,13 @@ void emu_step(void)
void emu_run(void) void emu_run(void)
{ {
void *timer = sys_timer(); void *timer = sys_timer();
char meow[500];
int delay; int delay;
int framecount=0;
vid_begin(); vid_begin();
lcd_begin(); lcd_begin();
#if !defined(SIMULATOR) && defined(HAVE_ADJUSTABLE_CPU_FREQ)
rb->cpu_boost(true);
#endif
while(shut==0) while(shut==0)
{ {
cpu_emulate(2280); cpu_emulate(2280);
@ -96,12 +97,12 @@ void emu_run(void)
while (R_LY > 0) /* wait for next frame */ while (R_LY > 0) /* wait for next frame */
emu_step(); emu_step();
framecount++;
snprintf(meow,499,"%d",framecount);
rb->lcd_putsxy(0,0,meow);
rb->lcd_update_rect(0,0,LCD_WIDTH,8);
rb->yield(); rb->yield();
} }
#if !defined(SIMULATOR) && defined(HAVE_ADJUSTABLE_CPU_FREQ)
rb->cpu_boost(false);
#endif
} }