Implemented delay function for windows, fixes some annoyances in the GUI
This commit is contained in:
@@ -45,7 +45,7 @@ EXTSYM GetMouseMoveY,GetMouseButton,SetMouseMinX,SetMouseMaxX,SetMouseMinY
|
||||
EXTSYM SetMouseMaxY,SetMouseX,SetMouseY,T36HZEnabled,MouseButton,Start36HZ
|
||||
EXTSYM Stop36HZ,BufferSizeW,BufferSizeB,ProcessSoundBuffer,CheckTimers
|
||||
EXTSYM vesa2_rfull,vesa2_rtrcl,vesa2_rtrcla,vesa2_gfull,vesa2_gtrcl,vesa2_gtrcla
|
||||
EXTSYM vesa2_bfull,vesa2_btrcl,vesa2_btrcla,Init_2xSaIMMXW
|
||||
EXTSYM vesa2_bfull,vesa2_btrcl,vesa2_btrcla,Init_2xSaIMMXW,DoSleep
|
||||
EXTSYM ZsnesPage,V8Mode,GrayscaleMode,PrevWinMode,PrevFSMode,FrameSemaphore
|
||||
EXTSYM _imp__GetLocalTime@4
|
||||
EXTSYM DisplayWIPDisclaimer
|
||||
@@ -879,9 +879,6 @@ NEWSYM initvideo ; Returns 1 in videotroub if trouble occurs
|
||||
popad
|
||||
ret
|
||||
|
||||
NEWSYM initvideo2 ; ModeQ scanline re-init (Keep blank on non-dos ports)
|
||||
ret
|
||||
|
||||
NEWSYM deinitvideo
|
||||
ret
|
||||
|
||||
@@ -1290,7 +1287,16 @@ NEWSYM SoundProcess ; This function is called ~60 times/s at full speed
|
||||
.nosound
|
||||
ret
|
||||
|
||||
section .data
|
||||
NEWSYM delayvalue, db 0
|
||||
|
||||
section .text
|
||||
|
||||
NEWSYM delay
|
||||
mov [delayvalue],ecx
|
||||
pushad
|
||||
call DoSleep
|
||||
popad
|
||||
ret
|
||||
|
||||
NEWSYM Check60hz
|
||||
|
||||
@@ -2535,8 +2535,7 @@ void drawscreenwin(void)
|
||||
DrawWin256x224x32();
|
||||
break;
|
||||
}
|
||||
|
||||
SURFDW=(DWORD *) &SurfBuf[(resolutn-1)*pitch];
|
||||
/* SURFDW=(DWORD *) &SurfBuf[(resolutn-1)*pitch];
|
||||
color32=0x7F000000;
|
||||
|
||||
for(i=0;i<256;i++)
|
||||
@@ -2551,7 +2550,7 @@ void drawscreenwin(void)
|
||||
{
|
||||
SURFDW[i]=color32;
|
||||
}
|
||||
break;
|
||||
break;*/
|
||||
case 24:
|
||||
MessageBox (NULL, "Sorry. ZSNESw does not work in windowed 24 bit color modes. \nClick 'OK' to switch to a full screen mode.", "DDRAW Error" , MB_ICONERROR );
|
||||
cvidmode=3;
|
||||
@@ -3135,6 +3134,16 @@ int CheckBatteryPercent()
|
||||
return((SysPowerStat.BatteryLifePercent == 255) ? -1 : SysPowerStat.BatteryLifePercent);
|
||||
}
|
||||
|
||||
extern "C" unsigned int delayvalue;
|
||||
|
||||
// Delay function for GUI
|
||||
void DoSleep()
|
||||
{
|
||||
// Fraction value for windows version of sleep
|
||||
delayvalue /= 100;
|
||||
|
||||
Sleep(delayvalue);
|
||||
}
|
||||
|
||||
extern "C" unsigned int PrevBuildNum;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user