Skip to content

Commit

Permalink
Wii: Use better preprocessor definition name
Browse files Browse the repository at this point in the history
Fix default Wiimote mapping A/B
  • Loading branch information
carstene1ns committed Dec 5, 2023
1 parent 4cec939 commit e569598
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/audio_midi.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class AudioDecoderMidi;

#include "audio_decoder_base.h"

#if defined(GEKKO) || defined(__3DS__)
#if defined(__wii__) || defined(__3DS__)
# define EP_MIDI_FREQ 22050
#else
# define EP_MIDI_FREQ 44100
Expand Down
2 changes: 1 addition & 1 deletion src/decoder_wildmidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ bool WildMidiDecoder::Initialize(std::string& error_message) {
found = FileFinder::Root().Exists(config_file);
}
}
#elif defined(GEKKO)
#elif defined(__wii__)
// preferred under /data
config_file = "usb:/data/wildmidi/wildmidi.cfg";
found = FileFinder::Root().Exists(config_file);
Expand Down
2 changes: 1 addition & 1 deletion src/decoder_xmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ bool XMPDecoder::Open(Filesystem_Stream::InputStream stream) {

int player_interpolation = 0;
int player_effects = 0;
#if defined(PSP) || defined(__3DS__) || defined(GEKKO)
#if defined(PSP) || defined(__3DS__) || defined(__wii__)
// disable filtering and use low quality interpolation
player_interpolation = XMP_INTERP_NEAREST;
#else
Expand Down
2 changes: 1 addition & 1 deletion src/filefinder_rtp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ FileFinder_RTP::FileFinder_RTP(bool no_rtp, bool no_rtp_warnings, std::string rt
std::string const version_str = Player::GetEngineVersion();
assert(!version_str.empty());

#ifdef GEKKO
#ifdef __wii__
AddPath("sd:/data/rtp/" + version_str);
AddPath("usb:/data/rtp/" + version_str);
#elif defined(__WIIU__)
Expand Down
2 changes: 1 addition & 1 deletion src/game_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ FilesystemView Game_Config::GetGlobalConfigFilesystem() {
std::string path;

if (config_path.empty()) {
#ifdef GEKKO
#ifdef __wii__
path = "/data/easyrpg-player";
#elif defined(__WIIU__)
path = "/vol/external01/data/easyrpg-player"; // temp
Expand Down
2 changes: 1 addition & 1 deletion src/platform/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#if defined(__3DS__)
#include "platform/3ds/clock.h"
using Platform_Clock = CtrClock;
#elif defined(GEKKO)
#elif defined(__wii__)
#include "platform/wii/clock.h"
using Platform_Clock = WiiClock;
#elif defined(__SWITCH__)
Expand Down
2 changes: 1 addition & 1 deletion src/platform/sdl/sdl_audio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ SdlAudio::SdlAudio(const Game_ConfigAudio& cfg) :
return;
}

#ifdef GEKKO
#ifdef __wii__
// Wii's DSP works at 32kHz natively
const int frequency = 32000;
#elif defined(EMSCRIPTEN)
Expand Down
12 changes: 6 additions & 6 deletions src/platform/sdl/sdl_ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include "player.h"
#include "bitmap.h"

#ifdef GEKKO
#ifdef __wii__
# include "platform/wii/main.h"
#endif

Expand Down Expand Up @@ -61,7 +61,7 @@ SdlUi::SdlUi(long width, long height, const Game_Config& cfg) : BaseUi(cfg)

// Set some SDL environment variables before starting. These are platform
// dependent, so every port needs to set them manually
#ifndef GEKKO
#ifndef __wii__
// Set window position to the middle of the screen
putenv(const_cast<char *>("SDL_VIDEO_WINDOW_POS=center"));
#endif
Expand Down Expand Up @@ -115,7 +115,7 @@ SdlUi::SdlUi(long width, long height, const Game_Config& cfg) : BaseUi(cfg)
format.b.mask,
format.a.mask);

#ifdef GEKKO
#ifdef __wii__
// Eliminate debug spew in on-screen console
Wii::SetConsole();
#endif
Expand Down Expand Up @@ -349,7 +349,7 @@ bool SdlUi::RefreshDisplayMode() {

int bpp = current_display_mode.bpp;

#ifdef GEKKO
#ifdef __wii__
// force for SDL-wii, otherwise 16 bit is used
bpp = 24;
#endif
Expand Down Expand Up @@ -443,7 +443,7 @@ bool SdlUi::ShowCursor(bool flag) {
}

bool SdlUi::LogMessage(const std::string &message) {
#ifdef GEKKO
#ifdef __wii__
return Wii::LogMessage(message);
#else
// not logged
Expand Down Expand Up @@ -750,7 +750,7 @@ int FilterUntilFocus(const SDL_Event* evnt) {
}

void SdlUi::vGetConfig(Game_ConfigVideo& cfg) const {
#ifdef GEKKO
#ifdef __wii__
cfg.renderer.Lock("SDL1 (Software, Wii)");
#else
cfg.renderer.Lock("SDL1 (Software)");
Expand Down
4 changes: 2 additions & 2 deletions src/platform/wii/input_buttons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
Input::ButtonMappingArray Input::GetDefaultButtonMappings() {
return {
// Wiimote
{CANCEL, Keys::JOY_OTHER_0}, // A, shared with Classic Controller (CC)
{DECISION, Keys::JOY_OTHER_1}, // B, shared with CC
{DECISION, Keys::JOY_OTHER_0}, // A, shared with Classic Controller (CC)
{CANCEL, Keys::JOY_OTHER_1}, // B, shared with CC
{CANCEL, Keys::JOY_OTHER_2}, // 1
{DECISION, Keys::JOY_OTHER_3}, // 2
{RESET, Keys::JOY_OTHER_4}, // -, shared with CC
Expand Down
2 changes: 1 addition & 1 deletion src/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#elif defined(__vita__)
# define SUPPORT_JOYSTICK
# define SUPPORT_JOYSTICK_AXIS
#elif defined(GEKKO)
#elif defined(__wii__)
# include <cstdint>
# define SUPPORT_JOYSTICK
# define SUPPORT_JOYSTICK_AXIS
Expand Down

0 comments on commit e569598

Please sign in to comment.