[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.10.2.6,1.10.2.7
From: |
Teunis Peters <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.10.2.6,1.10.2.7 |
Date: |
Tue, 08 Oct 2002 13:41:51 -0400 |
Update of /cvsroot/paragui/paragui/src/core
In directory subversions:/tmp/cvs-serv10434/src/core
Modified Files:
Tag: devel-opengl
pgapplication.cpp
Log Message:
Fixed crash-on-exit bug
Index: pgapplication.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgapplication.cpp,v
retrieving revision 1.10.2.6
retrieving revision 1.10.2.7
diff -C2 -r1.10.2.6 -r1.10.2.7
*** pgapplication.cpp 7 Oct 2002 22:23:26 -0000 1.10.2.6
--- pgapplication.cpp 8 Oct 2002 17:41:49 -0000 1.10.2.7
***************
*** 79,107 ****
*/
static bool __sdlinit = false;
void PARAGUI_ShutDownCode() {
/* fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__); */
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
PG_Draw::PG_Draw* dr = PG_Draw::PG_Draw::GetDefaultDrawable();
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
// this is pretty much the only spot where it's safe to delete in
// quite this manner...
! if (dr != NULL) {
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
dr->quit();
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
dr->prerm();
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
dr->postrm();
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
delete dr;
fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! } else {
! fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! };
// shutdown log
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
PG_LogConsole::Done();
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
// shutdown SDL
--- 79,99 ----
*/
static bool __sdlinit = false;
+ static bool __drawable = false;
void PARAGUI_ShutDownCode() {
/* fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__); */
PG_Draw::PG_Draw* dr = PG_Draw::PG_Draw::GetDefaultDrawable();
// this is pretty much the only spot where it's safe to delete in
// quite this manner...
! if (__drawable && dr != NULL) {
dr->quit();
dr->prerm();
dr->postrm();
delete dr;
+ } /* else {
fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
! }; */
// shutdown log
PG_LogConsole::Done();
// shutdown SDL
***************
*** 109,113 ****
SDL_Quit();
};
- fprintf(stderr, "%s:%s:%i\n", __FILE__, __FUNCTION__, __LINE__);
}
--- 101,104 ----
***************
*** 142,145 ****
--- 133,137 ----
/* drawable handles the videosystem init */
if (drawable == NULL) {
+ __drawable = true;
drawable = PG_Draw::PG_Draw::GetDefaultDrawable();
}
***************
*** 179,182 ****
--- 171,175 ----
delete drawable;
drawable = NULL;
+ __drawable = false;
}
***************
*** 189,192 ****
--- 182,186 ----
if (drawable == NULL) {
+ __drawable = true;
drawable = PG_Draw::PG_Draw::GetDefaultDrawable();
}
***************
*** 1322,1328 ****
if (d == NULL) {
if (drawable == NULL) {
! d = PG_Draw::PG_Draw::GetDefaultDrawable();
} else {
! return;
}
}
--- 1316,1323 ----
if (d == NULL) {
if (drawable == NULL) {
! __drawable = true;
! d = PG_Draw::PG_Draw::GetDefaultDrawable();
} else {
! return;
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.10.2.6,1.10.2.7,
Teunis Peters <address@hidden> <=