mirror of
https://github.com/OpenDriver2/REDRIVER2.git
synced 2024-11-25 03:42:34 +01:00
- [Psy-X] scratchPad fix (really?)
This commit is contained in:
parent
fd5ed926ab
commit
64a224c1a7
@ -33,16 +33,15 @@ extern int PadIdentifier;
|
||||
|
||||
#define _PAD(x,y) ((y)<<((x)<<4))
|
||||
|
||||
#define getScratchAddr(offset) ((u_long *)(scratchData+(offset)*4))
|
||||
#define getScratchAddr(offset) ((u_long *)(_scratchData+(offset)*4))
|
||||
|
||||
#define MODE_NTSC 0
|
||||
#define MODE_PAL 1
|
||||
#define MODE_PAL 1
|
||||
|
||||
#if defined(_LANGUAGE_C_PLUS_PLUS)||defined(__cplusplus)||defined(c_plusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern char scratchData[1024];
|
||||
extern char* _scratchData;
|
||||
|
||||
extern int CheckCallback(void);
|
||||
extern void PadInit(int mode);
|
||||
|
@ -5,7 +5,14 @@
|
||||
|
||||
#include <SDL_timer.h>
|
||||
|
||||
char scratchData[1024];
|
||||
#ifdef DEBUG
|
||||
char scratchData[4096 + 8];
|
||||
char* _scratchData = scratchData + 4;
|
||||
#else
|
||||
char scratchData[4096];
|
||||
char* _scratchData = scratchData;
|
||||
#endif
|
||||
|
||||
void(*vsync_callback)(void) = NULL;
|
||||
|
||||
int StopCallback(void)
|
||||
@ -50,6 +57,12 @@ int VSyncCallback(void(*f)(void))
|
||||
|
||||
long SetVideoMode(long mode)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
// debug marks for overflow cheks
|
||||
*(uint*)&scratchData[0] = 0xdeadb33f;
|
||||
*(uint*)&scratchData[4096 + 4] = 0xdeadb33f;
|
||||
#endif
|
||||
|
||||
return PsyX_Sys_SetVMode(mode);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user