mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 04:20:28 +00:00
add github action for c89 build (#13186)
* add retroarch.yml * fix c89 errors * attempt to add dependencies * update comments
This commit is contained in:
parent
574b850dd7
commit
088aa7dcb9
25
.github/workflows/retroarch.yml
vendored
Normal file
25
.github/workflows/retroarch.yml
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
# Validates compilation of RetroArch binary
|
||||
|
||||
name: RetroArch CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
linux-c89: # Smoketest build using most restrictive compiler and default options
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Dependencies
|
||||
run: sudo apt-get install build-essential libxkbcommon-dev libx11-xcb-dev zlib1g-dev libfreetype6-dev libegl1-mesa-dev libgles2-mesa-dev libgbm-dev nvidia-cg-toolkit nvidia-cg-dev libavcodec-dev libsdl2-dev libsdl-image1.2-dev libxml2-dev yasm
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Configure
|
||||
run: ./configure
|
||||
- name: Build
|
||||
run: make C89_BUILD=1
|
||||
|
2
Makefile
2
Makefile
@ -110,7 +110,7 @@ endif
|
||||
|
||||
ifneq ($(CXX_BUILD), 1)
|
||||
ifneq ($(C89_BUILD),)
|
||||
CFLAGS += -std=c89 -ansi -pedantic -Werror=pedantic -Wno-long-long
|
||||
CFLAGS += -std=c89 -ansi -pedantic -Werror=pedantic -Wno-long-long -Werror=declaration-after-statement
|
||||
else ifeq ($(HAVE_C99), 1)
|
||||
CFLAGS += $(C99_CFLAGS)
|
||||
endif
|
||||
|
@ -72,17 +72,17 @@ struct __attribute__((__packed__)) sixaxis_activation_report {
|
||||
};
|
||||
|
||||
union sixaxis_activation_report_f4 {
|
||||
struct sixaxis_activation_report data;
|
||||
uint8_t buf[5];
|
||||
struct sixaxis_activation_report data;
|
||||
};
|
||||
|
||||
union sixaxis_output_report_01 {
|
||||
struct sixaxis_output_report data;
|
||||
uint8_t buf[49];
|
||||
struct sixaxis_output_report data;
|
||||
};
|
||||
|
||||
static const union sixaxis_output_report_01 default_report = {
|
||||
.buf = {
|
||||
{
|
||||
0x01, /* report ID */
|
||||
0x00, /* padding */
|
||||
0xff, 0x00, /* right rumble */
|
||||
@ -101,7 +101,7 @@ static const union sixaxis_output_report_01 default_report = {
|
||||
};
|
||||
|
||||
static const union sixaxis_activation_report_f4 ds3_activation_packet = {
|
||||
.buf = { 0xF4, 0x42, 0x0c, 0x00, 0x00 }
|
||||
{ 0xF4, 0x42, 0x0c, 0x00, 0x00 }
|
||||
};
|
||||
|
||||
/* forward declarations */
|
||||
|
@ -128,6 +128,7 @@ static int16_t hidpad_wiiugca_get_axis(void *pad_data, unsigned axis)
|
||||
{
|
||||
axis_data axis_data;
|
||||
gca_pad_data_t *pad = (gca_pad_data_t *)pad_data;
|
||||
gca_device_data_t *device = (gca_device_data_t *)pad_data;
|
||||
|
||||
gamepad_read_axis_data(axis, &axis_data);
|
||||
|
||||
@ -136,7 +137,7 @@ static int16_t hidpad_wiiugca_get_axis(void *pad_data, unsigned axis)
|
||||
|
||||
if(pad->datatype == GCA_TYPE_PAD)
|
||||
return gamepad_get_axis_value(pad->analog, &axis_data);
|
||||
gca_device_data_t *device = (gca_device_data_t *)pad_data;
|
||||
|
||||
return gamepad_get_axis_value(device->pad_data[0].analog, &axis_data);
|
||||
}
|
||||
|
||||
|
@ -746,11 +746,12 @@ static void udev_input_handle_hotplug(udev_input_t *udev)
|
||||
if ( dev_type != UDEV_INPUT_KEYBOARD)
|
||||
{
|
||||
/*first clear all */
|
||||
for (int i = 0; i < MAX_USERS; i++)
|
||||
int i;
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
input_config_set_mouse_display_name(i, "N/A");
|
||||
|
||||
/* Add what devices we have now */
|
||||
for (int i = 0; i < udev->num_devices; ++i)
|
||||
for (i = 0; i < udev->num_devices; ++i)
|
||||
{
|
||||
if (udev->devices[i]->type != UDEV_INPUT_KEYBOARD)
|
||||
{
|
||||
@ -1373,6 +1374,7 @@ static void *udev_input_init(const char *joypad_driver)
|
||||
int mouse = 0;
|
||||
int keyboard=0;
|
||||
int fd;
|
||||
int i;
|
||||
#ifdef UDEV_XKB_HANDLING
|
||||
gfx_ctx_ident_t ctx_ident;
|
||||
#endif
|
||||
@ -1437,7 +1439,7 @@ static void *udev_input_init(const char *joypad_driver)
|
||||
RARCH_WARN("[udev]: Full-screen pointer won't be available.\n");
|
||||
#endif
|
||||
|
||||
for (int i = 0; i < udev->num_devices; ++i)
|
||||
for (i = 0; i < udev->num_devices; ++i)
|
||||
{
|
||||
if (udev->devices[i]->type != UDEV_INPUT_KEYBOARD)
|
||||
{
|
||||
|
@ -2682,7 +2682,7 @@ void input_config_reset(void)
|
||||
|
||||
input_config_reset_autoconfig_binds(i);
|
||||
|
||||
input_st->libretro_input_binds[i] = &input_config_binds[i];
|
||||
input_st->libretro_input_binds[i] = (const retro_keybind_set *)&input_config_binds[i];
|
||||
}
|
||||
}
|
||||
|
||||
@ -3483,7 +3483,7 @@ void input_keys_pressed(
|
||||
bool is_menu,
|
||||
int input_hotkey_block_delay,
|
||||
input_bits_t *p_new_state,
|
||||
retro_keybind_set *binds,
|
||||
const retro_keybind_set *binds,
|
||||
const struct retro_keybind *binds_norm,
|
||||
const struct retro_keybind *binds_auto,
|
||||
const input_device_driver_t *joypad,
|
||||
@ -5348,7 +5348,7 @@ void input_driver_collect_system_input(input_driver_state_t *input_st,
|
||||
menu_input_active,
|
||||
block_delay,
|
||||
loop_bits,
|
||||
input_config_binds,
|
||||
(const retro_keybind_set *)input_config_binds,
|
||||
binds_norm,
|
||||
binds_auto,
|
||||
joypad,
|
||||
@ -5435,7 +5435,7 @@ void input_driver_collect_system_input(input_driver_state_t *input_st,
|
||||
input_st->current_data,
|
||||
joypad,
|
||||
sec_joypad,
|
||||
&joypad_info, input_config_binds,
|
||||
&joypad_info, (const retro_keybind_set *)input_config_binds,
|
||||
input_st->keyboard_mapping_blocked,
|
||||
0,
|
||||
RETRO_DEVICE_KEYBOARD, 0, ids[i][0]))
|
||||
|
@ -132,8 +132,8 @@ struct input_keyboard_line
|
||||
bool enabled;
|
||||
};
|
||||
|
||||
extern struct retro_keybind input_config_binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
extern struct retro_keybind input_autoconf_binds[MAX_USERS][RARCH_BIND_LIST_END];
|
||||
extern retro_keybind_set input_config_binds[MAX_USERS];
|
||||
extern retro_keybind_set input_autoconf_binds[MAX_USERS];
|
||||
|
||||
struct rarch_joypad_info
|
||||
{
|
||||
@ -1029,7 +1029,7 @@ void input_keys_pressed(
|
||||
bool is_menu,
|
||||
int input_hotkey_block_delay,
|
||||
input_bits_t *p_new_state,
|
||||
retro_keybind_set *binds,
|
||||
const retro_keybind_set *binds,
|
||||
const struct retro_keybind *binds_norm,
|
||||
const struct retro_keybind *binds_auto,
|
||||
const input_device_driver_t *joypad,
|
||||
|
@ -241,7 +241,11 @@ int filestream_vscanf(RFILE *stream, const char* format, va_list *args)
|
||||
* cause the va_list to have an indeterminate value
|
||||
* in the function calling filestream_vscanf(),
|
||||
* leading to unexpected behaviour */
|
||||
#ifdef __va_copy
|
||||
__va_copy(args_copy, *args);
|
||||
#else
|
||||
va_copy(args_copy, *args);
|
||||
#endif
|
||||
|
||||
while (*format)
|
||||
{
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include <retro_common_api.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#include <frontend/frontend_driver.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user