mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-01-22 09:01:57 -05:00
Xbox: Fix stack overflow when downloading resources, fix textures not being deleted, try to increase deadzone
This commit is contained in:
parent
b58da2de66
commit
0991c0707e
3 changed files with 11 additions and 6 deletions
|
@ -8,6 +8,6 @@ SRCS = $(wildcard src/*.c) $(wildcard third_party/bearssl/src/*.c)
|
|||
SHADER_OBJS = misc/xbox/vs_coloured.inl misc/xbox/vs_textured.inl misc/xbox/ps_coloured.inl misc/xbox/ps_textured.inl
|
||||
NXDK_NET = y
|
||||
NXDK_CFLAGS = -Ithird_party/bearssl/inc -O1
|
||||
NXDK_LDFLAGS = -stack:131072
|
||||
NXDK_LDFLAGS = -stack:196608
|
||||
|
||||
include $(NXDK_DIR)/Makefile
|
|
@ -236,7 +236,12 @@ void Gfx_UpdateTexturePart(GfxResourceID texId, int x, int y, struct Bitmap* par
|
|||
}
|
||||
|
||||
void Gfx_DeleteTexture(GfxResourceID* texId) {
|
||||
// TODO
|
||||
CCTexture* tex = (CCTexture*)(*texId);
|
||||
if (!tex) return;
|
||||
|
||||
MmFreeContiguousMemory(tex->pixels);
|
||||
Mem_Free(tex);
|
||||
*texId = NULL;
|
||||
}
|
||||
|
||||
void Gfx_EnableMipmaps(void) { }
|
||||
|
|
|
@ -142,8 +142,8 @@ static void HandleButtons(xid_gamepad_in* gp) {
|
|||
}
|
||||
|
||||
static void HandleJoystick_Left(int x, int y) {
|
||||
if (Math_AbsI(x) <= 256) x = 0;
|
||||
if (Math_AbsI(y) <= 256) y = 0;
|
||||
if (Math_AbsI(x) <= 512) x = 0;
|
||||
if (Math_AbsI(y) <= 512) y = 0;
|
||||
|
||||
if (x == 0 && y == 0) return;
|
||||
Input.JoystickMovement = true;
|
||||
|
@ -153,8 +153,8 @@ static void HandleJoystick_Left(int x, int y) {
|
|||
static void HandleJoystick_Right(int x, int y, double delta) {
|
||||
float scale = (delta * 60.0) / 8192.0f;
|
||||
|
||||
if (Math_AbsI(x) <= 256) x = 0;
|
||||
if (Math_AbsI(y) <= 256) y = 0;
|
||||
if (Math_AbsI(x) <= 512) x = 0;
|
||||
if (Math_AbsI(y) <= 512) y = 0;
|
||||
|
||||
Event_RaiseRawMove(&ControllerEvents.RawMoved, x * scale, -y * scale);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue