Skip to content

Commit af50c2f

Browse files
Merge pull request #17792 from pstef/wii-fixes
Wii fixes
2 parents 4bf8855 + 6f95b97 commit af50c2f

5 files changed

Lines changed: 22 additions & 9 deletions

File tree

Makefile.wii

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,10 @@ ifeq ($(LOAD_WITHOUT_CORE_INFO),1)
265265
CFLAGS += -DLOAD_WITHOUT_CORE_INFO
266266
endif
267267

268+
ifneq ($(V),1)
269+
Q := @
270+
endif
271+
268272
OBJOUT = -o
269273
LINKOUT = -o
270274
LINK = $(CXX)
@@ -278,7 +282,8 @@ $(EXT_INTER_TARGET): $(OBJ)
278282
$(LINK) $(LINKOUT)$@ $(LDFLAGS) $(LIBDIRS) $(OBJ) $(PLATEXTRA) $(LIBS)
279283

280284
%.o: %.c
281-
$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
285+
@$(if $(Q), $(shell echo echo CC $<),)
286+
$(Q)$(CC) $(CFLAGS) -c $(OBJOUT)$@ $<
282287

283288
%.o: %.cpp
284289
$(CXX) $(CFLAGS) -c $(OBJOUT)$@ $<

deps/rcheevos/src/rc_compat.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
#include <ctype.h>
44
#include <stdarg.h>
55

6-
#if defined(_3DS) && !defined(_POSIX_THREADS)
7-
#include <../rthreads/ctr_pthread.h>
8-
#endif
9-
106
#ifdef RC_C89_HELPERS
117

128
int rc_strncasecmp(const char* left, const char* right, size_t length)
@@ -124,22 +120,24 @@ void rc_mutex_unlock(rc_mutex_t* mutex)
124120

125121
void rc_mutex_init(rc_mutex_t* mutex)
126122
{
127-
LWP_MutexInit(mutex, NULL);
123+
/* LWP_MutexInit has the handle passed by reference */
124+
/* Other LWP_Mutex* calls have the handle passed by value */
125+
LWP_MutexInit(&mutex->handle, 1);
128126
}
129127

130128
void rc_mutex_destroy(rc_mutex_t* mutex)
131129
{
132-
LWP_MutexDestroy(mutex);
130+
LWP_MutexDestroy(mutex->handle);
133131
}
134132

135133
void rc_mutex_lock(rc_mutex_t* mutex)
136134
{
137-
LWP_MutexLock(mutex);
135+
LWP_MutexLock(mutex->handle);
138136
}
139137

140138
void rc_mutex_unlock(rc_mutex_t* mutex)
141139
{
142-
LWP_MutexUnlock(mutex);
140+
LWP_MutexUnlock(mutex->handle);
143141
}
144142

145143
#elif defined(_3DS)

deps/rcheevos/src/rc_compat.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ RC_BEGIN_C_DECLS
8181
typedef struct rc_mutex_t {
8282
void* handle; /* HANDLE is defined as "void*" */
8383
} rc_mutex_t;
84+
#elif defined(GEKKO)
85+
#include <ogcsys.h>
86+
typedef struct rc_mutex_t {
87+
mutex_t handle;
88+
} rc_mutex_t;
8489
#elif defined(_3DS)
8590
#include <3ds/synchronization.h>
8691
typedef RecursiveLock rc_mutex_t;

gfx/drivers/gx_gfx.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@
7474
}
7575
#endif
7676

77+
void VIDEO_SetTrapFilter(bool enable);
78+
void VIDEO_SetGamma(int gamma);
79+
7780
enum
7881
{
7982
GX_RESOLUTIONS_DEFAULT = 0,

input/drivers_hid/wiiusb_hid.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616

1717
#include <stdlib.h>
18+
#include <unistd.h>
19+
#include <malloc.h>
1820

1921
#include <gccore.h>
2022
#include <rthreads/rthreads.h>

0 commit comments

Comments
 (0)