Skip to content

Commit 6e06b9e

Browse files
committed
Add Xbox memory status readout
1 parent 94f1563 commit 6e06b9e

File tree

2 files changed

+25
-1
lines changed

2 files changed

+25
-1
lines changed

desktop_version/src/Game.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ Game::Game(void):
194194
slowdown = 30;
195195
gameframerate=34;
196196

197-
fullscreen = true; //Assumed true at first unless overwritten at some point!
197+
fullscreen = false; //true; //Assumed true at first unless overwritten at some point!
198198
stretchMode = 0;
199199
useLinearFilter = false;
200200
advanced_mode = false;

desktop_version/src/main.cpp

+24
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
#include <hal/video.h>
3434
#include <windows.h>
3535

36+
extern "C" {
37+
extern int nextCol;
38+
extern int nextRow;
39+
}
40+
3641
extern "C" {
3742
extern uint8_t* _fb;
3843
}
@@ -558,6 +563,25 @@ debugPrint("Entering mainloop\n");
558563
game.gameclock();
559564
gameScreen.FlipScreen();
560565

566+
nextCol = 25;
567+
nextRow = 300;
568+
569+
debugPrint(" Memory statistics:\n");
570+
MM_STATISTICS ms;
571+
ms.Length = sizeof(MM_STATISTICS);
572+
MmQueryStatistics(&ms);
573+
#define PRINT(stat) debugPrint(" - " #stat ": %d\n", ms.stat);
574+
PRINT(TotalPhysicalPages)
575+
PRINT(AvailablePages)
576+
PRINT(VirtualMemoryBytesCommitted)
577+
PRINT(VirtualMemoryBytesReserved)
578+
PRINT(CachePagesCommitted)
579+
PRINT(PoolPagesCommitted)
580+
PRINT(StackPagesCommitted)
581+
PRINT(ImagePagesCommitted)
582+
#undef PRINT
583+
debugPrint("%d\n", (int)GetTickCount());
584+
561585
//SDL_FillRect( SDL_GetVideoSurface(), NULL, 0 );
562586
}
563587

0 commit comments

Comments
 (0)