From d374fb863c33b6016b084c3fb95281bc8b5aec35 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 29 Mar 2015 16:43:02 +0200 Subject: [PATCH] Use retro_inline.h for remaining 'inline' instances --- audio/audio_filters/fft/fft.h | 10 ++++++---- audio/librsound.c | 10 ++++++---- gfx/drivers_context/wgl_shader_dlg.c | 19 +++++++++++++++++-- gfx/drivers_context/wgl_shader_dlg.h | 1 - menu/drivers/rgui.c | 3 ++- 5 files changed, 31 insertions(+), 12 deletions(-) diff --git a/audio/audio_filters/fft/fft.h b/audio/audio_filters/fft/fft.h index 3e54ddcfa5..4952e8e04a 100644 --- a/audio/audio_filters/fft/fft.h +++ b/audio/audio_filters/fft/fft.h @@ -16,6 +16,8 @@ #ifndef RARCH_FFT_H__ #define RARCH_FFT_H__ +#include + typedef struct fft fft_t; // C99 would be nice. @@ -25,7 +27,7 @@ typedef struct float imag; } fft_complex_t; -static inline fft_complex_t fft_complex_mul(fft_complex_t a, +static INLINE fft_complex_t fft_complex_mul(fft_complex_t a, fft_complex_t b) { fft_complex_t out = { @@ -37,7 +39,7 @@ static inline fft_complex_t fft_complex_mul(fft_complex_t a, } -static inline fft_complex_t fft_complex_add(fft_complex_t a, +static INLINE fft_complex_t fft_complex_add(fft_complex_t a, fft_complex_t b) { fft_complex_t out = { @@ -49,7 +51,7 @@ static inline fft_complex_t fft_complex_add(fft_complex_t a, } -static inline fft_complex_t fft_complex_sub(fft_complex_t a, +static INLINE fft_complex_t fft_complex_sub(fft_complex_t a, fft_complex_t b) { fft_complex_t out = { @@ -61,7 +63,7 @@ static inline fft_complex_t fft_complex_sub(fft_complex_t a, } -static inline fft_complex_t fft_complex_conj(fft_complex_t a) +static INLINE fft_complex_t fft_complex_conj(fft_complex_t a) { fft_complex_t out = { a.real, -a.imag, diff --git a/audio/librsound.c b/audio/librsound.c index 68830fb9a2..abd6b78e44 100644 --- a/audio/librsound.c +++ b/audio/librsound.c @@ -69,6 +69,8 @@ #include #include +#include + /* **************************************************************************** Naming convention. Functions for use in API are called rsd_*(), * @@ -155,19 +157,19 @@ static void rsnd_thread(void *thread_data); /* Determine whether we're running big- or little endian */ -static inline int rsnd_is_little_endian(void) +static INLINE int rsnd_is_little_endian(void) { uint16_t i = 1; return *((uint8_t*)&i); } /* Simple functions for swapping bytes */ -static inline void rsnd_swap_endian_16 ( uint16_t * x ) +static INLINE void rsnd_swap_endian_16 ( uint16_t * x ) { *x = (*x>>8) | (*x<<8); } -static inline void rsnd_swap_endian_32 ( uint32_t * x ) +static INLINE void rsnd_swap_endian_32 ( uint32_t * x ) { *x = (*x >> 24 ) | ((*x<<8) & 0x00FF0000) | @@ -175,7 +177,7 @@ static inline void rsnd_swap_endian_32 ( uint32_t * x ) (*x << 24); } -static inline int rsnd_format_to_samplesize ( uint16_t fmt ) +static INLINE int rsnd_format_to_samplesize ( uint16_t fmt ) { switch(fmt) { diff --git a/gfx/drivers_context/wgl_shader_dlg.c b/gfx/drivers_context/wgl_shader_dlg.c index bc91ba788e..f3c75dd48c 100644 --- a/gfx/drivers_context/wgl_shader_dlg.c +++ b/gfx/drivers_context/wgl_shader_dlg.c @@ -1,3 +1,18 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2015 - Ali Bouhlel + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + #ifdef _MSC_VER #pragma comment( lib, "comctl32" ) #endif @@ -21,7 +36,7 @@ #include #include #include - +#include #define IDI_ICON 1 @@ -82,7 +97,7 @@ typedef struct static shader_dlg_t g_shader_dlg = {0}; -static inline void shader_dlg_refresh_trackbar_label(int index) +static INLINE void shader_dlg_refresh_trackbar_label(int index) { char val_buffer[32]; struct video_shader* shader = video_shader_driver_get_current_shader(); diff --git a/gfx/drivers_context/wgl_shader_dlg.h b/gfx/drivers_context/wgl_shader_dlg.h index 94cdfad2fc..18b852fd85 100644 --- a/gfx/drivers_context/wgl_shader_dlg.h +++ b/gfx/drivers_context/wgl_shader_dlg.h @@ -9,7 +9,6 @@ extern "C" { #define WIN32_LEAN_AND_MEAN #include - bool wgl_shader_dlg_init(void); void shader_dlg_show(HWND parent_hwnd); void shader_dlg_params_reload(void); diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index 5021975336..98cbbfc043 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -24,6 +24,7 @@ #include "../menu.h" #include #include +#include #include "../../gfx/drivers_font_renderer/bitmap.h" @@ -44,7 +45,7 @@ #define TITLE_COLOR(settings) (argb32_to_rgba4444(settings->menu.title_color)) #endif -static inline uint16_t argb32_to_rgba4444(uint32_t col) +static INLINE uint16_t argb32_to_rgba4444(uint32_t col) { unsigned a = ((col >> 24) & 0xff) >> 4; unsigned r = ((col >> 16) & 0xff) >> 4;