diff --git a/src/Graphics_NDS.c b/src/Graphics_NDS.c index 4c08659bc..7587eb91a 100644 --- a/src/Graphics_NDS.c +++ b/src/Graphics_NDS.c @@ -68,7 +68,8 @@ void Gfx_OnWindowResize(void) { } void Gfx_SetViewport(int x, int y, int w, int h) { - int x2 = x + w - 1, y2 = y + h - 1; + int x2 = x + w - 1; + int y2 = y + h - 1; GFX_VIEWPORT = x | (y << 8) | (x2 << 16) | (y2 << 24); } diff --git a/src/Menus.c b/src/Menus.c index 73fe556da..74feaaa6a 100644 --- a/src/Menus.c +++ b/src/Menus.c @@ -1454,13 +1454,13 @@ static int SaveLevelScreen_TextChanged(void* screen, const cc_string* str) { static int SaveLevelScreen_KeyDown(void* screen, int key, struct InputDevice* device) { struct SaveLevelScreen* s = (struct SaveLevelScreen*)screen; int handled; - SaveLevelScreen_RemoveOverwrites(s); handled = Menu_DoInputDown(s, key, device); /* Pressing Enter triggers save */ if (!handled && InputDevice_IsEnter(key, device)) SaveLevelScreen_Save(s, &s->save); + if (key != CCMOUSE_L) SaveLevelScreen_RemoveOverwrites(s); return Screen_InputDown(s, key, device); } diff --git a/third_party/gldc/src/state.c b/third_party/gldc/src/state.c index 562ac81ab..e02144e7e 100644 --- a/third_party/gldc/src/state.c +++ b/third_party/gldc/src/state.c @@ -152,7 +152,8 @@ void apply_poly_header(pvr_poly_hdr_t* dst, int list_type) { dst->mode2 |= (DimensionFlag(tx1->width) << PVR_TA_PM2_USIZE_SHIFT) & PVR_TA_PM2_USIZE_MASK; dst->mode2 |= (DimensionFlag(tx1->height) << PVR_TA_PM2_VSIZE_SHIFT) & PVR_TA_PM2_VSIZE_MASK; - dst->mode3 = (tx1->color << PVR_TA_PM3_TXRFMT_SHIFT) & PVR_TA_PM3_TXRFMT_MASK; + dst->mode3 = (0 << PVR_TA_PM3_MIPMAP_SHIFT) & PVR_TA_PM3_MIPMAP_MASK; + dst->mode3 |= (tx1->color << PVR_TA_PM3_TXRFMT_SHIFT) & PVR_TA_PM3_TXRFMT_MASK; dst->mode3 |= ((uint32_t)tx1->data & 0x00fffff8) >> 3; } diff --git a/third_party/gldc/src/texture.c b/third_party/gldc/src/texture.c index 85c9836a6..5f8e1af13 100644 --- a/third_party/gldc/src/texture.c +++ b/third_party/gldc/src/texture.c @@ -166,7 +166,6 @@ int gldcAllocTexture(int w, int h, int format) { /* changed - free old texture memory */ yalloc_free(YALLOC_BASE, active->data); active->data = NULL; - active->mipmap = 0; } } @@ -181,9 +180,6 @@ int gldcAllocTexture(int w, int h, int format) { active->data = yalloc_alloc_and_defrag(bytes); } if (!active->data) return GL_OUT_OF_MEMORY; - - /* Mark level 0 as set in the mipmap bitmask */ - active->mipmap |= (1 << 0); return 0; }