mirror of
https://github.com/libretro/RetroArch
synced 2025-04-02 16:20:39 +00:00
(Xbox 360) Buildfixes
This commit is contained in:
parent
1b1d5c468d
commit
8464ad30bd
gfx
libretro-common/file
menu
@ -24,6 +24,10 @@
|
|||||||
#include "../include/d3d8/d3dx8tex.h"
|
#include "../include/d3d8/d3dx8tex.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _XBOX
|
||||||
|
#include <xgraphics.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
bool d3d_swap(void *data, LPDIRECT3DDEVICE dev)
|
bool d3d_swap(void *data, LPDIRECT3DDEVICE dev)
|
||||||
{
|
{
|
||||||
#if defined(_XBOX1)
|
#if defined(_XBOX1)
|
||||||
|
@ -14,7 +14,10 @@
|
|||||||
* If not, see <http://www.gnu.org/licenses/>.
|
* If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#ifdef _XBOX
|
||||||
#include <xtl.h>
|
#include <xtl.h>
|
||||||
|
#include <xgraphics.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <string/stdstring.h>
|
#include <string/stdstring.h>
|
||||||
|
|
||||||
|
@ -118,28 +118,27 @@ static bool path_stat(const char *path, enum stat_mode mode, int32_t *size)
|
|||||||
struct _stat buf;
|
struct _stat buf;
|
||||||
char *path_local;
|
char *path_local;
|
||||||
wchar_t *path_wide;
|
wchar_t *path_wide;
|
||||||
|
DWORD file_info;
|
||||||
|
|
||||||
if (!path || !*path)
|
if (!path || !*path)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1400
|
|
||||||
(void)path_wide;
|
(void)path_wide;
|
||||||
|
(void)path_local;
|
||||||
|
(void)file_info;
|
||||||
|
|
||||||
|
#if defined(_MSC_VER) && _MSC_VER < 1400 || defined(_XBOX)
|
||||||
/* assume W-functions do not work below VC2005 */
|
/* assume W-functions do not work below VC2005 */
|
||||||
path_local = utf8_to_local_string_alloc(path);
|
path_local = utf8_to_local_string_alloc(path);
|
||||||
|
file_info = GetFileAttributes(path_local);
|
||||||
DWORD file_info = GetFileAttributes(path_local);
|
|
||||||
|
|
||||||
_stat(path_local, &buf);
|
_stat(path_local, &buf);
|
||||||
|
|
||||||
if (path_local)
|
if (path_local)
|
||||||
free(path_local);
|
free(path_local);
|
||||||
#else
|
#else
|
||||||
(void)path_local;
|
|
||||||
|
|
||||||
path_wide = utf8_to_utf16_string_alloc(path);
|
path_wide = utf8_to_utf16_string_alloc(path);
|
||||||
|
file_info = GetFileAttributesW(path_wide);
|
||||||
DWORD file_info = GetFileAttributesW(path_wide);
|
|
||||||
|
|
||||||
_wstat(path_wide, &buf);
|
_wstat(path_wide, &buf);
|
||||||
|
|
||||||
@ -915,15 +914,17 @@ void fill_short_pathname_representation_noext(char* out_rep,
|
|||||||
|
|
||||||
int path_file_remove(const char *path)
|
int path_file_remove(const char *path)
|
||||||
{
|
{
|
||||||
char *path_local;
|
char *path_local = NULL;
|
||||||
wchar_t *path_wide;
|
wchar_t *path_wide = NULL;
|
||||||
|
|
||||||
if (!path || !*path)
|
if (!path || !*path)
|
||||||
return false;
|
return false;
|
||||||
#if defined(_WIN32) && !defined(_XBOX)
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1400
|
(void)path_local;
|
||||||
(void)path_wide;
|
(void)path_wide;
|
||||||
|
|
||||||
|
#if defined(_WIN32) && !defined(_XBOX)
|
||||||
|
#if defined(_MSC_VER) && _MSC_VER < 1400
|
||||||
path_local = utf8_to_local_string_alloc(path);
|
path_local = utf8_to_local_string_alloc(path);
|
||||||
|
|
||||||
if (path_local)
|
if (path_local)
|
||||||
@ -934,8 +935,6 @@ int path_file_remove(const char *path)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
(void)path_local;
|
|
||||||
|
|
||||||
path_wide = utf8_to_utf16_string_alloc(path);
|
path_wide = utf8_to_utf16_string_alloc(path);
|
||||||
|
|
||||||
if (path_wide)
|
if (path_wide)
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
struct RDIR
|
struct RDIR
|
||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1400
|
#if defined(_MSC_VER) && _MSC_VER < 1400 || defined(_XBOX)
|
||||||
WIN32_FIND_DATA entry;
|
WIN32_FIND_DATA entry;
|
||||||
#else
|
#else
|
||||||
WIN32_FIND_DATAW entry;
|
WIN32_FIND_DATAW entry;
|
||||||
@ -95,10 +95,10 @@ struct RDIR *retro_opendir(const char *name)
|
|||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
char path_buf[1024];
|
char path_buf[1024];
|
||||||
char *path_local = NULL;
|
char *path_local = NULL;
|
||||||
wchar_t *path_wide = NULL;
|
wchar_t *path_wide = NULL;
|
||||||
#endif
|
#endif
|
||||||
struct RDIR *rdir = (struct RDIR*)calloc(1, sizeof(*rdir));
|
struct RDIR *rdir = (struct RDIR*)calloc(1, sizeof(*rdir));
|
||||||
|
|
||||||
if (!rdir)
|
if (!rdir)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -106,10 +106,10 @@ struct RDIR *retro_opendir(const char *name)
|
|||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
path_buf[0] = '\0';
|
path_buf[0] = '\0';
|
||||||
snprintf(path_buf, sizeof(path_buf), "%s\\*", name);
|
snprintf(path_buf, sizeof(path_buf), "%s\\*", name);
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1400
|
#if defined(_MSC_VER) && _MSC_VER < 1400 || defined(_XBOX)
|
||||||
(void)path_wide;
|
(void)path_wide;
|
||||||
|
|
||||||
path_local = utf8_to_local_string_alloc(path_buf);
|
path_local = utf8_to_local_string_alloc(path_buf);
|
||||||
rdir->directory = FindFirstFile(path_local, &rdir->entry);
|
rdir->directory = FindFirstFile(path_local, &rdir->entry);
|
||||||
|
|
||||||
if (path_local)
|
if (path_local)
|
||||||
@ -117,7 +117,7 @@ struct RDIR *retro_opendir(const char *name)
|
|||||||
#else
|
#else
|
||||||
(void)path_local;
|
(void)path_local;
|
||||||
|
|
||||||
path_wide = utf8_to_utf16_string_alloc(path_buf);
|
path_wide = utf8_to_utf16_string_alloc(path_buf);
|
||||||
rdir->directory = FindFirstFileW(path_wide, &rdir->entry);
|
rdir->directory = FindFirstFileW(path_wide, &rdir->entry);
|
||||||
|
|
||||||
if (path_wide)
|
if (path_wide)
|
||||||
@ -155,7 +155,7 @@ int retro_readdir(struct RDIR *rdir)
|
|||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
if(rdir->next)
|
if(rdir->next)
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1400
|
#if defined(_MSC_VER) && _MSC_VER < 1400 || defined(_XBOX)
|
||||||
return (FindNextFile(rdir->directory, &rdir->entry) != 0);
|
return (FindNextFile(rdir->directory, &rdir->entry) != 0);
|
||||||
#else
|
#else
|
||||||
return (FindNextFileW(rdir->directory, &rdir->entry) != 0);
|
return (FindNextFileW(rdir->directory, &rdir->entry) != 0);
|
||||||
@ -177,7 +177,7 @@ int retro_readdir(struct RDIR *rdir)
|
|||||||
const char *retro_dirent_get_name(struct RDIR *rdir)
|
const char *retro_dirent_get_name(struct RDIR *rdir)
|
||||||
{
|
{
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#if defined(_MSC_VER) && _MSC_VER < 1400
|
#if defined(_MSC_VER) && _MSC_VER < 1400 || defined(_XBOX)
|
||||||
char *name_local = local_to_utf8_string_alloc(rdir->entry.cFileName);
|
char *name_local = local_to_utf8_string_alloc(rdir->entry.cFileName);
|
||||||
memset(rdir->entry.cFileName, 0, sizeof(rdir->entry.cFileName));
|
memset(rdir->entry.cFileName, 0, sizeof(rdir->entry.cFileName));
|
||||||
strlcpy(rdir->entry.cFileName, name_local, sizeof(rdir->entry.cFileName));
|
strlcpy(rdir->entry.cFileName, name_local, sizeof(rdir->entry.cFileName));
|
||||||
|
@ -2997,6 +2997,7 @@ static int menu_displaylist_parse_load_content_settings(
|
|||||||
static int menu_displaylist_parse_horizontal_content_actions(
|
static int menu_displaylist_parse_horizontal_content_actions(
|
||||||
menu_displaylist_info_t *info)
|
menu_displaylist_info_t *info)
|
||||||
{
|
{
|
||||||
|
bool content_loaded = false;
|
||||||
unsigned idx = rpl_entry_selection_ptr;
|
unsigned idx = rpl_entry_selection_ptr;
|
||||||
menu_handle_t *menu = NULL;
|
menu_handle_t *menu = NULL;
|
||||||
const char *label = NULL;
|
const char *label = NULL;
|
||||||
@ -3016,7 +3017,7 @@ static int menu_displaylist_parse_horizontal_content_actions(
|
|||||||
playlist_get_index(playlist, idx,
|
playlist_get_index(playlist, idx,
|
||||||
&entry_path, &label, &core_path, &core_name, NULL, &db_name);
|
&entry_path, &label, &core_path, &core_name, NULL, &db_name);
|
||||||
|
|
||||||
bool content_loaded = !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)
|
content_loaded = !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)
|
||||||
&& string_is_equal(menu->deferred_path, fullpath);
|
&& string_is_equal(menu->deferred_path, fullpath);
|
||||||
|
|
||||||
if (content_loaded)
|
if (content_loaded)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user