mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-18 20:15:35 -04:00
DS: Try to fix issues with water overlapping from outside of world, don't infinitely loop when connecting to WIFI
This commit is contained in:
parent
9164d7c9c3
commit
189b164be4
@ -24,10 +24,12 @@ extern cc_bool Game_UseCPEBlocks;
|
||||
extern cc_string Game_Username;
|
||||
extern cc_string Game_Mppass;
|
||||
|
||||
#ifdef CC_BUILD_N64
|
||||
#define DEFAULT_VIEWDIST 20
|
||||
#if defined CC_BUILD_N64
|
||||
#define DEFAULT_VIEWDIST 20
|
||||
#elif defined CC_BUILD_NDS
|
||||
#define DEFAULT_VIEWDIST 192
|
||||
#else
|
||||
#define DEFAULT_VIEWDIST 512
|
||||
#define DEFAULT_VIEWDIST 512
|
||||
#endif
|
||||
#define DEFAULT_MAX_VIEWDIST 32768
|
||||
|
||||
|
@ -187,7 +187,7 @@ static void Gfx_RestoreState(void) {
|
||||
InitDefaultResources();
|
||||
}
|
||||
|
||||
cc_bool Gfx_WarnIfNecessary(void) { return false; }
|
||||
cc_bool Gfx_WarnIfNecessary(void) { return true; }
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
|
@ -365,15 +365,32 @@ cc_result Socket_CheckWritable(cc_socket s, cc_bool* writable) {
|
||||
return res;
|
||||
}
|
||||
|
||||
static void InitNetworking(void) {
|
||||
if (!Wifi_InitDefault(INIT_ONLY)) {
|
||||
Platform_LogConst("Initing WIFI failed"); return;
|
||||
}
|
||||
Wifi_AutoConnect();
|
||||
|
||||
for (int i = 0; i < 300; i++)
|
||||
{
|
||||
int status = Wifi_AssocStatus();
|
||||
if (status == ASSOCSTATUS_ASSOCIATED) return;
|
||||
|
||||
if (status == ASSOCSTATUS_CANNOTCONNECT) {
|
||||
Platform_LogConst("Can't connect to WIFI"); return;
|
||||
}
|
||||
swiWaitForVBlank();
|
||||
}
|
||||
Platform_LogConst("Gave up after 300 tries");
|
||||
}
|
||||
|
||||
|
||||
/*########################################################################################################################*
|
||||
*--------------------------------------------------------Platform---------------------------------------------------------*
|
||||
*#########################################################################################################################*/
|
||||
void Platform_Init(void) {
|
||||
InitFilesystem();
|
||||
if (!Wifi_InitDefault(WFC_CONNECT)) {
|
||||
Platform_LogConst("Can't connect to WIFI");
|
||||
}
|
||||
InitNetworking();
|
||||
|
||||
cpuStartTiming(1);
|
||||
// TODO: Redesign Drawer2D to better handle this
|
||||
|
Loading…
x
Reference in New Issue
Block a user