mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-23 02:42:38 +01:00
95fcb6a046
- [EMU] removed D3D9 support
70 lines
896 B
C
70 lines
896 B
C
#include "LIBETC.H"
|
|
|
|
#include "EMULATOR_PRIVATE.H"
|
|
#include "EMULATOR.H"
|
|
|
|
#include <SDL_timer.h>
|
|
|
|
void(*vsync_callback)(void) = NULL;
|
|
|
|
int StopCallback(void)
|
|
{
|
|
UNIMPLEMENTED();
|
|
return 0;
|
|
}
|
|
|
|
int ResetCallback(void)
|
|
{
|
|
vsync_callback = NULL;
|
|
return 0;
|
|
}
|
|
|
|
extern unsigned int g_swapTime;
|
|
extern int Emulator_DoVSyncCallback();
|
|
|
|
int VSync(int mode)
|
|
{
|
|
if (mode < 0)
|
|
{
|
|
// don't wait but still return vblank count
|
|
return Emulator_DoVSyncCallback();
|
|
}
|
|
|
|
if (mode == 0)
|
|
{
|
|
Emulator_WaitForTimestep(1);
|
|
}
|
|
else if (mode > 0)
|
|
{
|
|
// FIXME: wait many times?
|
|
}
|
|
|
|
return Emulator_DoVSyncCallback();
|
|
}
|
|
|
|
int VSyncCallback(void(*f)(void))
|
|
{
|
|
vsync_callback = f;
|
|
return 0;
|
|
}
|
|
|
|
long GetVideoMode(void)
|
|
{
|
|
#ifdef NTSC_VERSION
|
|
return MODE_NTSC;
|
|
#else
|
|
return MODE_PAL;
|
|
#endif
|
|
}
|
|
|
|
long SetVideoMode(long mode)
|
|
{
|
|
UNIMPLEMENTED();
|
|
|
|
#ifdef NTSC_VERSION
|
|
return MODE_NTSC;
|
|
#else
|
|
return MODE_PAL;
|
|
#endif
|
|
}
|