Skip to content

Commit e0641c8

Browse files
authored
Merge pull request #238 from carmiker/master
Fix build errors and update CMakeLists.txt
2 parents 1c11184 + 9be3a60 commit e0641c8

5 files changed

Lines changed: 12 additions & 10 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# 'LICENSE', which is part of this source code package.
77
#
88

9-
cmake_minimum_required(VERSION 2.8)
9+
cmake_minimum_required(VERSION 3.15)
1010
project(cen64 C)
1111

1212
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules" ${CMAKE_MODULE_PATH})
@@ -480,7 +480,7 @@ add_executable(cen64
480480
target_link_libraries(cen64
481481
${EXTRA_OS_LIBS}
482482
${OPENAL_LIBRARY}
483-
${OPENGL_gl_LIBRARY}
483+
${OPENGL_LIBRARY}
484484
${ICONV_LIBRARIES}
485485
${VIDEO_LIB}
486486
${CMAKE_THREAD_LIBS_INIT}

cen64.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ int run_device(struct cen64_device *device, bool no_video) {
472472
return 1;
473473
}
474474

475-
cen64_thread_setname(thread, "device");
475+
cen64_thread_setname(&thread, "device");
476476

477477
if (!no_video)
478478
cen64_gl_window_thread(device);

device/device.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ int device_multithread_spin(struct cen64_device *device) {
283283
}
284284

285285

286-
cen64_thread_setname(vr4300_thread, "vr4300");
286+
cen64_thread_setname(&vr4300_thread, "vr4300");
287287

288288
run_rcp_thread(device);
289289

@@ -351,4 +351,4 @@ int device_debug_spin(struct cen64_device *device) {
351351

352352
cen64_cold void device_connect_debugger(struct cen64_device *device, void* break_handler_data, vr4300_debug_break_handler break_handler) {
353353
vr4300_connect_debugger(device->vr4300, break_handler_data, break_handler);
354-
}
354+
}

vr4300/interface.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ void signal_rcp_interrupt(struct vr4300 *vr4300, enum rcp_interrupt_mask mask) {
8989
}
9090

9191
// Reads a word from the MI MMIO register space.
92-
int read_mi_regs(struct vr4300 *vr4300, uint32_t address, uint32_t *word) {
92+
int read_mi_regs(void *vr4300_ptr, uint32_t address, uint32_t *word) {
93+
struct vr4300* vr4300 = (struct vr4300*)vr4300_ptr;
9394
uint32_t offset = address - MI_REGS_BASE_ADDRESS;
9495
enum mi_register reg = (offset >> 2);
9596

@@ -99,7 +100,8 @@ int read_mi_regs(struct vr4300 *vr4300, uint32_t address, uint32_t *word) {
99100
}
100101

101102
// Writes a word to the MI MMIO register space.
102-
int write_mi_regs(struct vr4300 *vr4300, uint32_t address, uint32_t word, uint32_t dqm) {
103+
int write_mi_regs(void *vr4300_ptr, uint32_t address, uint32_t word, uint32_t dqm) {
104+
struct vr4300* vr4300 = (struct vr4300*)vr4300_ptr;
103105
uint32_t offset = address - MI_REGS_BASE_ADDRESS;
104106
enum mi_register reg = (offset >> 2);
105107
uint32_t result;
@@ -239,4 +241,4 @@ bool vr4300_read_word_vaddr(struct vr4300 *vr4300, uint64_t vaddr, uint32_t* res
239241
}
240242

241243
return true;
242-
}
244+
}

vr4300/interface.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ uint64_t vr4300_get_pc(struct vr4300 *vr4300);
5050

5151
bool vr4300_read_word_vaddr(struct vr4300 *vr4300, uint64_t vaddr, uint32_t* result);
5252

53-
int read_mi_regs(struct vr4300 *vr4300, uint32_t address, uint32_t *word);
54-
int write_mi_regs(struct vr4300 *vr4300, uint32_t address, uint32_t word, uint32_t dqm);
53+
int read_mi_regs(void *vr4300_ptr, uint32_t address, uint32_t *word);
54+
int write_mi_regs(void *vr4300_ptr, uint32_t address, uint32_t word, uint32_t dqm);
5555

5656
void clear_rcp_interrupt(struct vr4300 *vr4300, enum rcp_interrupt_mask mask);
5757
void signal_rcp_interrupt(struct vr4300 *vr4300, enum rcp_interrupt_mask mask);

0 commit comments

Comments
 (0)