Skip to content

Commit

Permalink
Fix using Wii platform code
Browse files Browse the repository at this point in the history
  • Loading branch information
carstene1ns committed Oct 26, 2023
1 parent 71a931b commit 39abf2b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/io/controls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
#define DEFAULT_BUTTON_PAUSE (11)
#define DEFAULT_BUTTON_YES (-1)
#define DEFAULT_BUTTON_NO (-1)
#elif defined(WII)
#elif defined(__wii__)
#define DEFAULT_BUTTON_UP (-1)
#define DEFAULT_BUTTON_DOWN (-1)
#define DEFAULT_BUTTON_LEFT (-1)
Expand Down
2 changes: 1 addition & 1 deletion src/io/gfx/video.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
#define NO_RESIZE

#define FULLSCREEN_FLAGS (SDL_SWSURFACE | SDL_TOPSCR | SDL_CONSOLEBOTTOM)
#elif defined(WII)
#elif defined(__wii__)
#define DEFAULT_SCREEN_WIDTH 640
#define DEFAULT_SCREEN_HEIGHT 480

Expand Down
6 changes: 3 additions & 3 deletions src/io/network.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
static u32* socBuffer = NULL;
#define SOC_BUFFERSIZE 0x100000 // maybe 0x80000 is enough
#endif
#elif defined(WII)
#elif defined(__wii__)
#include <network.h>
#elif defined(USE_SDL_NET)
#include <arpa/inet.h>
Expand All @@ -86,7 +86,7 @@ Network::Network () {
socInit(socBuffer, SOC_BUFFERSIZE);
#endif
#elif defined USE_SDL_NET
# ifdef WII
# ifdef __wii__
char ip[16];

// Initialize Wii networking (using dhcp)
Expand All @@ -113,7 +113,7 @@ Network::~Network () {
#endif
#elif defined USE_SDL_NET
SDLNet_Quit();
# ifdef WII
# ifdef __wii__
net_deinit();
# endif
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/platforms/platforms.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ inline void PLATFORM_Init() {
PSP_Init();
#endif

#ifdef WII
Wii_Init();
#ifdef __wii__
WII_Init();
#endif

#ifdef _3DS
Expand Down
10 changes: 3 additions & 7 deletions src/platforms/wii.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

/**
*
* @file wiz.cpp
* @file wii.cpp
*
* Part of the OpenJazz project
*
Expand All @@ -13,7 +13,7 @@

#include "wii.h"

#ifdef WII
#ifdef __wii__

#include <gccore.h>
#include <ogc/usbgecko.h>
Expand Down Expand Up @@ -49,14 +49,11 @@ const devoptab_t dotab_geckoout = {
NULL, NULL, NULL
};

void Wii_Init() {

void WII_Init() {
// enable file system

fatInitDefault();

// set console

LWP_MutexInit(&usbgecko_mutex, false);
usbgecko = usb_isgeckoalive(SLOT);

Expand All @@ -69,7 +66,6 @@ void Wii_Init() {
devoptab_list[STD_OUT] = &dotab_stdnull;
devoptab_list[STD_ERR] = &dotab_stdnull;
}

}

#endif
4 changes: 2 additions & 2 deletions src/platforms/wii.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
#ifndef _WII_H
#define _WII_H

#ifdef WII
#ifdef __wii__

void Wii_Init();
void WII_Init();

#endif

Expand Down

0 comments on commit 39abf2b

Please sign in to comment.