Fix MSVC 2003 build

This commit is contained in:
twinaphex 2017-11-26 22:41:34 +01:00
parent 97f971fd46
commit e35394d4bd
5 changed files with 8 additions and 8 deletions

View File

@ -2658,11 +2658,11 @@ void input_config_get_bind_string(char *buf, const struct retro_keybind *bind,
break;
} /* switch ( bind->mbutton ) */
if ( tag != 0 ) {
if ( delim ) {
if (tag != 0)
{
if (delim)
strlcat(buf, ", ", size);
}
strlcat( buf, msg_hash_to_str(tag), size );
strlcat(buf, msg_hash_to_str((msg_hash_enums)tag), size );
delim = 1;
}
}

View File

@ -64,7 +64,7 @@ size_t strlcat(char *dest, const char *source, size_t size)
char *strldup(const char *s, size_t n)
{
char *dst = malloc(sizeof(char) * (n + 1));
char *dst = (char*)malloc(sizeof(char) * (n + 1));
strlcpy(dst, s, n);
return dst;
}

View File

@ -79,7 +79,7 @@ static void *nbio_mmap_win32_open(const char * filename, unsigned mode)
ptr = MapViewOfFile(mem, is_write ? (FILE_MAP_READ|FILE_MAP_WRITE) : FILE_MAP_READ, 0, 0, len.QuadPart);
CloseHandle(mem);
handle = malloc(sizeof(struct nbio_mmap_win32_t));
handle = (nbio_mmap_win32_t*)malloc(sizeof(struct nbio_mmap_win32_t));
handle->file = file;
handle->is_write = is_write;

View File

@ -1368,7 +1368,7 @@ static int default_action_ok_load_content_with_core_from_menu(const char *_path,
content_info.argv = NULL;
content_info.args = NULL;
content_info.environ_get = NULL;
if (!task_push_load_content_with_core_from_menu(_path, &content_info, _type, NULL, NULL))
if (!task_push_load_content_with_core_from_menu(_path, &content_info, (rarch_core_type)_type, NULL, NULL))
return -1;
return 0;
}

View File

@ -67,7 +67,7 @@ void task_file_load_handler(retro_task_t *task)
case NBIO_STATUS_INIT:
if (nbio && !string_is_empty(nbio->path))
{
struct nbio_t *handle = nbio_open(nbio->path, NBIO_READ);
struct nbio_t *handle = (struct nbio_t*)nbio_open(nbio->path, NBIO_READ);
if (handle)
{