mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 19:21:03 +00:00
Fix a dozen CXX_BUILD errors under Windows.
This commit is contained in:
parent
12376cd611
commit
fcbaca9b66
@ -69,7 +69,7 @@ static INLINE unsigned write_avail(unsigned read_ptr, unsigned write_ptr, unsign
|
||||
return (read_ptr + buffer_size - write_ptr) % buffer_size;
|
||||
}
|
||||
|
||||
static INLINE void get_positions(dsound_t *ds, uint32_t *read_ptr, uint32_t *write_ptr)
|
||||
static INLINE void get_positions(dsound_t *ds, DWORD *read_ptr, DWORD *write_ptr)
|
||||
{
|
||||
IDirectSoundBuffer_GetCurrentPosition(ds->dsb, read_ptr, write_ptr);
|
||||
}
|
||||
@ -80,8 +80,8 @@ struct audio_lock
|
||||
{
|
||||
void *chunk1;
|
||||
void *chunk2;
|
||||
uint32_t size1;
|
||||
uint32_t size2;
|
||||
DWORD size1;
|
||||
DWORD size2;
|
||||
};
|
||||
|
||||
static INLINE bool grab_region(dsound_t *ds, uint32_t write_ptr,
|
||||
@ -133,7 +133,7 @@ static INLINE void release_region(dsound_t *ds, const struct audio_lock *region)
|
||||
|
||||
static void dsound_thread(void *data)
|
||||
{
|
||||
uint32_t write_ptr;
|
||||
DWORD write_ptr;
|
||||
dsound_t *ds = (dsound_t*)data;
|
||||
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
|
||||
@ -144,7 +144,7 @@ static void dsound_thread(void *data)
|
||||
while (ds->thread_alive)
|
||||
{
|
||||
struct audio_lock region;
|
||||
uint32_t read_ptr, avail, fifo_avail;
|
||||
DWORD read_ptr, avail, fifo_avail;
|
||||
get_positions(ds, &read_ptr, NULL);
|
||||
|
||||
avail = write_avail(read_ptr, write_ptr, ds->buffer_size);
|
||||
@ -233,7 +233,7 @@ static bool dsound_start_thread(dsound_t *ds)
|
||||
static void dsound_clear_buffer(dsound_t *ds)
|
||||
{
|
||||
void *ptr;
|
||||
uint32_t size;
|
||||
DWORD size;
|
||||
IDirectSoundBuffer_SetCurrentPosition(ds->dsb, 0);
|
||||
|
||||
if (IDirectSoundBuffer_Lock(ds->dsb, 0, 0, &ptr, &size,
|
||||
|
@ -14,6 +14,7 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "builtin.h"
|
||||
|
||||
#define CTRINPUT_DEFAULT_BINDS \
|
||||
|
@ -14,6 +14,7 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "builtin.h"
|
||||
|
||||
#define GXINPUT_GAMECUBE_DEFAULT_BINDS \
|
||||
|
@ -14,6 +14,7 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "builtin.h"
|
||||
|
||||
#define PS3INPUT_DEFAULT_BINDS \
|
||||
|
@ -14,6 +14,7 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "builtin.h"
|
||||
|
||||
#define PSPINPUT_DEFAULT_BINDS \
|
||||
|
@ -14,6 +14,7 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "builtin.h"
|
||||
|
||||
#define XINPUT_DEFAULT_BINDS \
|
||||
|
@ -14,6 +14,7 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "builtin.h"
|
||||
|
||||
#define XINPUT_DEFAULT_BINDS \
|
||||
|
@ -26,6 +26,7 @@
|
||||
#ifdef NEED_DYNAMIC
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <compat/posix_string.h>
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <dlfcn.h>
|
||||
|
@ -3,29 +3,30 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#ifdef _MSC_VER
|
||||
#define setmode _setmode
|
||||
#endif
|
||||
#ifdef _XBOX
|
||||
#include <xtl.h>
|
||||
#define INVALID_FILE_ATTRIBUTES -1
|
||||
#else
|
||||
#include <io.h>
|
||||
#include <fcntl.h>
|
||||
#include <direct.h>
|
||||
#include <windows.h>
|
||||
#endif
|
||||
# include <compat/posix_string.h>
|
||||
# ifdef _MSC_VER
|
||||
# define setmode _setmode
|
||||
# endif
|
||||
# ifdef _XBOX
|
||||
# include <xtl.h>
|
||||
# define INVALID_FILE_ATTRIBUTES -1
|
||||
# else
|
||||
# include <io.h>
|
||||
# include <fcntl.h>
|
||||
# include <direct.h>
|
||||
# include <windows.h>
|
||||
# endif
|
||||
#elif defined(VITA)
|
||||
#include <psp2/io/fcntl.h>
|
||||
#include <psp2/io/dirent.h>
|
||||
# include <psp2/io/fcntl.h>
|
||||
# include <psp2/io/dirent.h>
|
||||
#else
|
||||
#if defined(PSP)
|
||||
#include <pspiofilemgr.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <dirent.h>
|
||||
#include <unistd.h>
|
||||
# if defined(PSP)
|
||||
# include <pspiofilemgr.h>
|
||||
# endif
|
||||
# include <sys/types.h>
|
||||
# include <sys/stat.h>
|
||||
# include <dirent.h>
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef __CELLOS_LV2__
|
||||
|
@ -24,6 +24,9 @@
|
||||
#include <gfx/scaler/scaler_int.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <math.h>
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <retro_inline.h>
|
||||
|
@ -31,18 +31,8 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#undef strcasecmp
|
||||
#undef strdup
|
||||
#undef isblank
|
||||
#undef strtok_r
|
||||
#define strcasecmp(a, b) rarch_strcasecmp__(a, b)
|
||||
#define strdup(orig) rarch_strdup__(orig)
|
||||
#define isblank(c) rarch_isblank__(c)
|
||||
#define strtok_r(str, delim, saveptr) rarch_strtok_r__(str, delim, saveptr)
|
||||
int strcasecmp(const char *a, const char *b);
|
||||
char *strdup(const char *orig);
|
||||
int isblank(int c);
|
||||
char *strtok_r(char *str, const char *delim, char **saveptr);
|
||||
#include <stdio.h>
|
||||
#define snprintf _snprintf
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user