mirror of
https://github.com/dwsJason/xrick2gs.git
synced 2024-06-07 18:29:34 +00:00
Cleanup when the application exits
This commit is contained in:
parent
daf4734fea
commit
d2951e11fb
19
src/sysvid.c
19
src/sysvid.c
|
@ -312,6 +312,21 @@ static LoadSegRec result;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Attempt a proper shutdown
|
||||||
|
//
|
||||||
|
void IIGShutdown()
|
||||||
|
{
|
||||||
|
RemoveKeyboardDriver();
|
||||||
|
ADBShutDown();
|
||||||
|
EMShutDown();
|
||||||
|
MTShutDown();
|
||||||
|
|
||||||
|
DisposeAll(userid());
|
||||||
|
|
||||||
|
//SystemMMShutDown();
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -355,7 +370,7 @@ sysvid_init(void)
|
||||||
|
|
||||||
GetLoadSegments();
|
GetLoadSegments();
|
||||||
|
|
||||||
#if 0
|
#if 1
|
||||||
// Allocate Bank E1 memory - Actual Video memory
|
// Allocate Bank E1 memory - Actual Video memory
|
||||||
printf("Allocate Bank $E1 memory\n");
|
printf("Allocate Bank $E1 memory\n");
|
||||||
hndl = NewHandle(0x8000, userid(), 0xC003, (pointer) 0xE12000);
|
hndl = NewHandle(0x8000, userid(), 0xC003, (pointer) 0xE12000);
|
||||||
|
@ -374,7 +389,7 @@ sysvid_init(void)
|
||||||
directPageHandle = (U32*)NewHandle( 0x100, userid(), 0xC005, 0 );
|
directPageHandle = (U32*)NewHandle( 0x100, userid(), 0xC005, 0 );
|
||||||
if (toolerror())
|
if (toolerror())
|
||||||
{
|
{
|
||||||
printf("Unable to allocate 512 bytes Direct Page\n");
|
printf("Unable to allocate 256 bytes Direct Page\n");
|
||||||
printf("Game can't run\n");
|
printf("Game can't run\n");
|
||||||
sys_sleep(5000); // Wait 5 seconds
|
sys_sleep(5000); // Wait 5 seconds
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|
|
@ -31,13 +31,15 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void scr_credit();
|
void scr_credit();
|
||||||
|
void IIGShutdown();
|
||||||
/*
|
/*
|
||||||
* main
|
* main
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
main(int argc, char *argv[])
|
main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
atexit( IIGShutdown ); // Make Sure cleanup stuff is done
|
||||||
|
|
||||||
// Get the credit screen up ASAP
|
// Get the credit screen up ASAP
|
||||||
scr_credit();
|
scr_credit();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user