sms wip: random tweaks, refactoring (palette, sound stuff, etc)

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@764 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2009-08-28 20:16:33 +00:00
parent 460603fa81
commit 19954be196
13 changed files with 168 additions and 136 deletions

View file

@ -1332,7 +1332,7 @@ void emu_loop(void)
{
int pframes_done; /* "period" frames, used for sync */
int frames_done, frames_shown; /* actual frames for fps counter */
int oldmodes, target_fps, target_frametime;
int target_fps, target_frametime;
unsigned int timestamp_base = 0, timestamp_fps;
char *notice_msg = NULL;
char fpsbuff[24];
@ -1341,8 +1341,8 @@ void emu_loop(void)
fpsbuff[0] = 0;
/* make sure we are in correct mode */
oldmodes = ((Pico.video.reg[12]&1)<<2) ^ 0xc;
Pico.m.dirtyPal = 1;
rendstatus_old = -1;
/* number of ticks per frame */
if (Pico.m.pal) {
@ -1371,7 +1371,6 @@ void emu_loop(void)
{
unsigned int timestamp;
int diff, diff_lim;
int modes;
timestamp = get_ticks();
if (reset_timing) {
@ -1398,13 +1397,6 @@ void emu_loop(void)
}
}
// check for mode changes
modes = ((Pico.video.reg[12]&1)<<2) | (Pico.video.reg[1]&8);
if (modes != oldmodes) {
oldmodes = modes;
pemu_video_mode_change(!(modes & 4), (modes & 8));
}
// second changed?
if (timestamp - timestamp_fps >= ms_to_ticks(1000))
{