Latest compatible version of Classicube from the original GitHub repository (https://github.com/ClassiCube/ClassiCube) that can be compiled on Classicube for PowerMac PPC running Mac OS X 10.4.

This commit is contained in:
Andrei Alexandru
2025-12-17 13:17:57 +02:00
commit c71492f846
1248 changed files with 422858 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
/*
* Copyright (c) 2021 Max Thomas
* This file is part of DSiWifi and is distributed under the MIT license.
* See dsiwifi_license.txt for terms of use.
*/
#include "wifi_debug.h"
#include "dsiwifi9.h"
#include <nds.h>
#include <nds/interrupts.h>
#include <stdio.h>
#include <stdarg.h>
char __print_buffer[0x200] = {0};
void wifi_printf(char* fmt, ...)
{
if (!DSiWifi_pfnLogHandler)
return;
int lock = enterCriticalSection();
va_list args;
va_start(args, fmt);
vsnprintf(__print_buffer, 0x200-1, fmt, args);
va_end(args);
DSiWifi_pfnLogHandler(__print_buffer);
leaveCriticalSection(lock);
}
void wifi_printlnf(char* fmt, ...)
{
if (!DSiWifi_pfnLogHandler)
return;
int lock = enterCriticalSection();
va_list args;
va_start(args, fmt);
vsnprintf(__print_buffer, 0x200-2, fmt, args);
strcat(__print_buffer, "\n");
va_end(args);
DSiWifi_pfnLogHandler(__print_buffer);
leaveCriticalSection(lock);
}