mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-14 10:05:44 -04:00
Wii/GameCube: Fix memory corruption when playing music
This commit is contained in:
parent
ff9ef2285e
commit
361859cd09
@ -1285,7 +1285,7 @@ cc_bool Audio_DescribeError(cc_result res, cc_string* dst) {
|
||||
|
||||
cc_result Audio_AllocChunks(cc_uint32 size, void** chunks, int numChunks) {
|
||||
size = (size + 0x1F) & ~0x1F; // round up to nearest multiple of 0x20
|
||||
void* dst = memalign(0x20, size);
|
||||
void* dst = memalign(0x20, size * numChunks);
|
||||
if (!dst) return ERR_OUT_OF_MEMORY;
|
||||
|
||||
for (int i = 0; i < numChunks; i++) {
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include <gx2/surface.h>
|
||||
#include <gx2/swap.h>
|
||||
#include <gx2/temp.h>
|
||||
#include <gx2/utils.h>
|
||||
#include <gx2r/draw.h>
|
||||
#include <gx2r/mem.h>
|
||||
#include <gx2r/buffer.h>
|
||||
@ -473,9 +474,9 @@ void Gfx_GetApiInfo(cc_string* info) {
|
||||
void Gfx_OnWindowResize(void) {
|
||||
|
||||
}
|
||||
void Gfx_3DS_SetRenderScreen(enum Screen3DS screen) {
|
||||
void Gfx_3DS_SetRenderScreen1(enum Screen3DS screen) {
|
||||
GX2ContextState* tv_state = WHBGfxGetTVContextState();
|
||||
GX2ContextState* drc_state = WHBGfxGetDRCContextState();
|
||||
GX2ContextState* drc_state = WHBGfxGetDRCContextState(); // TODO
|
||||
|
||||
GX2SetContextState(screen == TOP_SCREEN ? tv_state : drc_state);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user