mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +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;
|
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);
|
IDirectSoundBuffer_GetCurrentPosition(ds->dsb, read_ptr, write_ptr);
|
||||||
}
|
}
|
||||||
@ -80,8 +80,8 @@ struct audio_lock
|
|||||||
{
|
{
|
||||||
void *chunk1;
|
void *chunk1;
|
||||||
void *chunk2;
|
void *chunk2;
|
||||||
uint32_t size1;
|
DWORD size1;
|
||||||
uint32_t size2;
|
DWORD size2;
|
||||||
};
|
};
|
||||||
|
|
||||||
static INLINE bool grab_region(dsound_t *ds, uint32_t write_ptr,
|
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)
|
static void dsound_thread(void *data)
|
||||||
{
|
{
|
||||||
uint32_t write_ptr;
|
DWORD write_ptr;
|
||||||
dsound_t *ds = (dsound_t*)data;
|
dsound_t *ds = (dsound_t*)data;
|
||||||
|
|
||||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
|
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
|
||||||
@ -144,7 +144,7 @@ static void dsound_thread(void *data)
|
|||||||
while (ds->thread_alive)
|
while (ds->thread_alive)
|
||||||
{
|
{
|
||||||
struct audio_lock region;
|
struct audio_lock region;
|
||||||
uint32_t read_ptr, avail, fifo_avail;
|
DWORD read_ptr, avail, fifo_avail;
|
||||||
get_positions(ds, &read_ptr, NULL);
|
get_positions(ds, &read_ptr, NULL);
|
||||||
|
|
||||||
avail = write_avail(read_ptr, write_ptr, ds->buffer_size);
|
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)
|
static void dsound_clear_buffer(dsound_t *ds)
|
||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr;
|
||||||
uint32_t size;
|
DWORD size;
|
||||||
IDirectSoundBuffer_SetCurrentPosition(ds->dsb, 0);
|
IDirectSoundBuffer_SetCurrentPosition(ds->dsb, 0);
|
||||||
|
|
||||||
if (IDirectSoundBuffer_Lock(ds->dsb, 0, 0, &ptr, &size,
|
if (IDirectSoundBuffer_Lock(ds->dsb, 0, 0, &ptr, &size,
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../input_autodetect.h"
|
||||||
#include "builtin.h"
|
#include "builtin.h"
|
||||||
|
|
||||||
#define CTRINPUT_DEFAULT_BINDS \
|
#define CTRINPUT_DEFAULT_BINDS \
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../input_autodetect.h"
|
||||||
#include "builtin.h"
|
#include "builtin.h"
|
||||||
|
|
||||||
#define GXINPUT_GAMECUBE_DEFAULT_BINDS \
|
#define GXINPUT_GAMECUBE_DEFAULT_BINDS \
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../input_autodetect.h"
|
||||||
#include "builtin.h"
|
#include "builtin.h"
|
||||||
|
|
||||||
#define PS3INPUT_DEFAULT_BINDS \
|
#define PS3INPUT_DEFAULT_BINDS \
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../input_autodetect.h"
|
||||||
#include "builtin.h"
|
#include "builtin.h"
|
||||||
|
|
||||||
#define PSPINPUT_DEFAULT_BINDS \
|
#define PSPINPUT_DEFAULT_BINDS \
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../input_autodetect.h"
|
||||||
#include "builtin.h"
|
#include "builtin.h"
|
||||||
|
|
||||||
#define XINPUT_DEFAULT_BINDS \
|
#define XINPUT_DEFAULT_BINDS \
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../input_autodetect.h"
|
||||||
#include "builtin.h"
|
#include "builtin.h"
|
||||||
|
|
||||||
#define XINPUT_DEFAULT_BINDS \
|
#define XINPUT_DEFAULT_BINDS \
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#ifdef NEED_DYNAMIC
|
#ifdef NEED_DYNAMIC
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
#include <compat/posix_string.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
@ -3,29 +3,30 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#ifdef _MSC_VER
|
# include <compat/posix_string.h>
|
||||||
#define setmode _setmode
|
# ifdef _MSC_VER
|
||||||
#endif
|
# define setmode _setmode
|
||||||
#ifdef _XBOX
|
# endif
|
||||||
#include <xtl.h>
|
# ifdef _XBOX
|
||||||
#define INVALID_FILE_ATTRIBUTES -1
|
# include <xtl.h>
|
||||||
#else
|
# define INVALID_FILE_ATTRIBUTES -1
|
||||||
#include <io.h>
|
# else
|
||||||
#include <fcntl.h>
|
# include <io.h>
|
||||||
#include <direct.h>
|
# include <fcntl.h>
|
||||||
#include <windows.h>
|
# include <direct.h>
|
||||||
#endif
|
# include <windows.h>
|
||||||
|
# endif
|
||||||
#elif defined(VITA)
|
#elif defined(VITA)
|
||||||
#include <psp2/io/fcntl.h>
|
# include <psp2/io/fcntl.h>
|
||||||
#include <psp2/io/dirent.h>
|
# include <psp2/io/dirent.h>
|
||||||
#else
|
#else
|
||||||
#if defined(PSP)
|
# if defined(PSP)
|
||||||
#include <pspiofilemgr.h>
|
# include <pspiofilemgr.h>
|
||||||
#endif
|
# endif
|
||||||
#include <sys/types.h>
|
# include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
# include <sys/stat.h>
|
||||||
#include <dirent.h>
|
# include <dirent.h>
|
||||||
#include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __CELLOS_LV2__
|
#ifdef __CELLOS_LV2__
|
||||||
|
@ -24,6 +24,9 @@
|
|||||||
#include <gfx/scaler/scaler_int.h>
|
#include <gfx/scaler/scaler_int.h>
|
||||||
#include <retro_miscellaneous.h>
|
#include <retro_miscellaneous.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#ifndef M_PI
|
||||||
|
#define M_PI 3.14159265358979323846
|
||||||
|
#endif
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <retro_inline.h>
|
#include <retro_inline.h>
|
||||||
|
@ -31,18 +31,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#undef strcasecmp
|
#include <stdio.h>
|
||||||
#undef strdup
|
#define snprintf _snprintf
|
||||||
#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);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user