3DS/PSP: Fix rarely drawing from wrong vertex buffer

This commit is contained in:
UnknownShadow200 2023-08-12 09:38:47 +10:00
parent 6eeb34b1a2
commit bfada15b23
5 changed files with 16 additions and 15 deletions

View File

@ -269,14 +269,19 @@ Further information (e.g. style) for ClassiCube's source code can be found in th
* [Clang](https://clang.llvm.org/) - Compiles client for macOS
* [Emscripten](https://emscripten.org/) - Compiles client for web
* [RenderDoc](https://renderdoc.org/) - Graphics debugging
* [libogc](https://github.com/devkitPro/libogc) - Backend for Wii and GameCube
* [libctru](https://github.com/devkitPro/libctru) - Backend for 3DS
* [citro3D](https://github.com/devkitPro/citro3d) - Rendering backend for 3DS
* [pspsdk](https://github.com/pspdev/pspsdk) - Backend for PSP
* [libfat](https://github.com/devkitPro/libfat) - Filesystem backend for Wii/GC
* [Citra](https://github.com/citra-emu/citra) - Emulator used to test 3DS port
* [Dolphin](https://github.com/dolphin-emu/dolphin) - Emulator used to test Wii/GC port
* [pspsdk](https://github.com/pspdev/pspsdk) - Backend for PSP
* [PPSSPP](https://github.com/hrydgard/ppsspp) - Emulator used to test 3DS port
* [libogc](https://github.com/devkitPro/libogc) - Backend for Wii and GameCube
* [libfat](https://github.com/devkitPro/libfat) - Filesystem backend for Wii/GC
* [Dolphin](https://github.com/dolphin-emu/dolphin) - Emulator used to test Wii/GC port
* [KallistiOS](https://github.com/KallistiOS/KallistiOS) - Backend for Dreamcast
* [nullDC](https://github.com/skmp/nulldc) - Emulator used to test Dreamcast port
* [nxdk](https://github.com/XboxDev/nxdk) - Backend for Xbox
* [xemu](https://github.com/xemu-project/xemu) - Emulator used to test Xbox port
## Sound Credits
ClassiCube uses sounds from [Freesound.org](https://freesound.org)<br>

View File

@ -316,9 +316,7 @@ cc_result Gfx_TakeScreenshot(struct Stream* output) {
}
void Gfx_GetApiInfo(cc_string* info) {
int pointerSize = sizeof(void*) * 8;
String_Format1(info, "-- Using 3DS (%i bit) --\n", &pointerSize);
String_Format1(info, "-- Using 3DS --\n", NULL);
String_Format2(info, "Max texture size: (%i, %i)\n", &Gfx.MaxTexWidth, &Gfx.MaxTexHeight);
}
@ -419,6 +417,7 @@ void* Gfx_LockDynamicVb(GfxResourceID vb, VertexFormat fmt, int count) {
void Gfx_UnlockDynamicVb(GfxResourceID vb) { gfx_vertices = vb; }
void Gfx_SetDynamicVbData(GfxResourceID vb, void* vertices, int vCount) {
gfx_vertices = vb;
Mem_Copy(vb, vertices, vCount * gfx_stride);
}

View File

@ -238,9 +238,7 @@ cc_result Gfx_TakeScreenshot(struct Stream* output) {
}
void Gfx_GetApiInfo(cc_string* info) {
int pointerSize = sizeof(void*) * 8;
String_Format1(info, "-- Using GC/WII (%i bit) --\n", &pointerSize);
String_Format1(info, "-- Using GC/WII --", NULL);
String_Format2(info, "Max texture size: (%i, %i)\n", &Gfx.MaxTexWidth, &Gfx.MaxTexHeight);
}

View File

@ -229,9 +229,7 @@ cc_result Gfx_TakeScreenshot(struct Stream* output) {
}
void Gfx_GetApiInfo(cc_string* info) {
int pointerSize = sizeof(void*) * 8;
String_Format1(info, "-- Using PSP (%i bit) --\n", &pointerSize);
String_Format1(info, "-- Using PSP--\n", NULL);
String_Format2(info, "Max texture size: (%i, %i)\n", &Gfx.MaxTexWidth, &Gfx.MaxTexHeight);
}
@ -320,6 +318,7 @@ void Gfx_UnlockDynamicVb(GfxResourceID vb) {
}
void Gfx_SetDynamicVbData(GfxResourceID vb, void* vertices, int vCount) {
gfx_vertices = vb;
Mem_Copy(vb, vertices, vCount * gfx_stride);
sceKernelDcacheWritebackInvalidateRange(vertices, vCount * gfx_stride);
}

View File

@ -64,8 +64,8 @@ cc_uint64 Stopwatch_Measure(void) {
}
void Platform_Log(const char* msg, int len) {
write(STDOUT_FILENO, msg, len);
write(STDOUT_FILENO, "\n", 1);
fs_write(STDOUT_FILENO, msg, len);
fs_write(STDOUT_FILENO, "\n", 1);
}
TimeMS DateTime_CurrentUTC_MS(void) {