mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 03:25:14 -04:00
DS: Fix freezing when going in-game without a texture pack
This commit is contained in:
parent
a7da47e552
commit
e52be3a30a
@ -66,17 +66,18 @@ cc_uint64 Stopwatch_Measure(void) {
|
||||
static void LogNocash(const char* msg, int len) {
|
||||
// Can only be up to 120 bytes total
|
||||
char buffer[120];
|
||||
len = min(len, 119);
|
||||
len = min(len, 118);
|
||||
|
||||
Mem_Copy(buffer, msg, len);
|
||||
buffer[len] = '\n';
|
||||
nocashWrite(buffer, len + 1);
|
||||
buffer[len + 0] = '\n';
|
||||
buffer[len + 1] = '\0';
|
||||
nocashWrite(buffer, len + 2);
|
||||
}
|
||||
|
||||
extern void consolePrintString(const char* ptr, int len);
|
||||
void Platform_Log(const char* msg, int len) {
|
||||
LogNocash(msg, len);
|
||||
if (!keyboardOpen) consolePrintString(msg, len);
|
||||
consolePrintString(msg, len);
|
||||
}
|
||||
|
||||
TimeMS DateTime_CurrentUTC(void) {
|
||||
|
@ -269,7 +269,7 @@ void Window_AllocFramebuffer(struct Bitmap* bmp) {
|
||||
bmp->scan0 = (BitmapCol*)Mem_Alloc(bmp->width * bmp->height, 4, "window pixels");
|
||||
}
|
||||
|
||||
static void DrawIt(struct Bitmap* bmp) {
|
||||
static void DrawIt(void) {
|
||||
Gfx_LoadIdentityMatrix(MATRIX_VIEW);
|
||||
Gfx_LoadIdentityMatrix(MATRIX_PROJECTION);
|
||||
Gfx_SetDepthTest(false);
|
||||
@ -281,19 +281,18 @@ static void DrawIt(struct Bitmap* bmp) {
|
||||
Gfx_DrawVb_IndexedTris(4);
|
||||
}
|
||||
|
||||
static void DrawTV(struct Bitmap* bmp) {
|
||||
static void DrawTV(void) {
|
||||
WHBGfxBeginRenderTV();
|
||||
WHBGfxClearColor(0.0f, 0.0f, 1.0f, 1.0f);
|
||||
DrawIt(bmp);
|
||||
DrawIt();
|
||||
WHBGfxFinishRenderTV();
|
||||
}
|
||||
|
||||
static void DrawDRC(struct Bitmap* bmp) {
|
||||
static void DrawDRC(void) {
|
||||
WHBGfxBeginRenderDRC();
|
||||
WHBGfxClearColor(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
DrawIt(bmp);
|
||||
DrawIt();
|
||||
WHBGfxFinishRenderDRC();
|
||||
|
||||
}
|
||||
|
||||
void Window_DrawFramebuffer(Rect2D r, struct Bitmap* bmp) {
|
||||
@ -306,8 +305,8 @@ void Window_DrawFramebuffer(Rect2D r, struct Bitmap* bmp) {
|
||||
Gfx_UpdateTexture(&fb, r.x, r.y, &part, bmp->width, false);
|
||||
|
||||
WHBGfxBeginRender();
|
||||
DrawTV(bmp);
|
||||
DrawDRC(bmp);
|
||||
DrawTV();
|
||||
DrawDRC();
|
||||
WHBGfxFinishRender();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user