[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.1,1.2 pgfilearch
From: |
Alexander Pipelka <address@hidden> |
Subject: |
[paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.1,1.2 pgfilearchive.cpp,1.1,1.2 pgsurfacecache.cpp,1.1,1.2 |
Date: |
Fri, 26 Apr 2002 08:43:25 -0400 |
Update of /cvsroot/paragui/paragui/src/core
In directory subversions:/tmp/cvs-serv8548/src/core
Modified Files:
pgapplication.cpp pgfilearchive.cpp pgsurfacecache.cpp
Log Message:
fixed (hopefully) a compilation error on ia64 & alpha (Thanks Matthew Wilcox
<address@hidden>, Michael Moerz <address@hidden>(
worked around a bug in phyfs (i think)
Index: pgapplication.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgapplication.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** pgapplication.cpp 15 Apr 2002 14:53:56 -0000 1.1
--- pgapplication.cpp 26 Apr 2002 12:43:22 -0000 1.2
***************
*** 69,77 ****
*/
void PARAGUI_ShutDownCode() {
! // shutdown SDL
! SDL_Quit();
// shutdown PhysFS
! PG_Application::Deinit();
}
--- 69,83 ----
*/
void PARAGUI_ShutDownCode() {
! // shutdown log
! PG_LogConsole::Done();
!
! // remove all archives from PG_FileArchive
! PG_FileArchive::RemoveAllArchives();
// shutdown PhysFS
! PG_FileArchive::Deinit();
!
! // shutdown SDL
! SDL_Quit();
}
***************
*** 660,669 ****
my_Theme = NULL;
}
-
- // shutdown log
- PG_LogConsole::Done();
-
- // remove all archives from PG_FileArchive
- RemoveAllArchives();
// destroy screen mutex
--- 666,669 ----
Index: pgfilearchive.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgfilearchive.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** pgfilearchive.cpp 15 Apr 2002 14:53:56 -0000 1.1
--- pgfilearchive.cpp 26 Apr 2002 12:43:22 -0000 1.2
***************
*** 42,47 ****
PG_FileArchive::PG_FileArchive() {
// First instance ? -> initialize PhysFS
! if(my_instance_count == 0) {
if(PHYSFS_init("paragui") == 0) {
PG_LogERR("Unable to initialize PhysicsFS !");
--- 42,50 ----
PG_FileArchive::PG_FileArchive() {
+ // increment instance count
+ my_instance_count++;
+
// First instance ? -> initialize PhysFS
! if(my_instance_count == 1) {
if(PHYSFS_init("paragui") == 0) {
PG_LogERR("Unable to initialize PhysicsFS !");
***************
*** 50,72 ****
}
- // increment instance count
- my_instance_count = 1;
}
PG_FileArchive::~PG_FileArchive() {
// decrement instance count
! //my_instance_count--;
!
! // i think there's a bug in PhysFS.
! // it constantly crashed when calling init, deinit multiple times
! /*if(my_instance_count == 0) {
! PHYSFS_deinit();
! }*/
}
void PG_FileArchive::Deinit() {
! PHYSFS_deinit();
}
--- 53,74 ----
}
}
PG_FileArchive::~PG_FileArchive() {
+ if(my_instance_count == 0) {
+ return;
+ }
+
// decrement instance count
! my_instance_count--;
! if(my_instance_count == 0) {
! Deinit();
! }
}
void PG_FileArchive::Deinit() {
! //PHYSFS_deinit();
}
Index: pgsurfacecache.cpp
===================================================================
RCS file: /cvsroot/paragui/paragui/src/core/pgsurfacecache.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** pgsurfacecache.cpp 15 Apr 2002 14:53:56 -0000 1.1
--- pgsurfacecache.cpp 26 Apr 2002 12:43:22 -0000 1.2
***************
*** 118,124 ****
assert(w != 0 && h != 0);
! sprintf(tmpkey, "%04x%04x%08x%01i%01i",
w, h,
! reinterpret_cast<unsigned int>(background),
bkmode,
blend);
--- 118,124 ----
assert(w != 0 && h != 0);
! sprintf(tmpkey, "%04x%04x%08lx%01i%01i",
w, h,
! reinterpret_cast<unsigned long>(background),
bkmode,
blend);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paragui-cvs] CVS: paragui/src/core pgapplication.cpp,1.1,1.2 pgfilearchive.cpp,1.1,1.2 pgsurfacecache.cpp,1.1,1.2,
Alexander Pipelka <address@hidden> <=
- Prev by Date:
[paragui-cvs] CVS: paragui/src/widgets pglistboxitem.cpp,1.4,1.5 pgwidget.cpp,1.3,1.4
- Next by Date:
[paragui-cvs] CVS: paragui/src Makefile.am,1.2,1.3
- Previous by thread:
[paragui-cvs] CVS: paragui/src/widgets pglistboxitem.cpp,1.4,1.5 pgwidget.cpp,1.3,1.4
- Next by thread:
[paragui-cvs] CVS: paragui/src Makefile.am,1.2,1.3
- Index(es):