mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
(360) Move class definitions to rmenu_xui.cpp instead of header
This commit is contained in:
parent
18769094e6
commit
13de2c5acd
@ -18,6 +18,8 @@
|
|||||||
#include <crtdefs.h>
|
#include <crtdefs.h>
|
||||||
#include <tchar.h>
|
#include <tchar.h>
|
||||||
#include <xtl.h>
|
#include <xtl.h>
|
||||||
|
#include <xui.h>
|
||||||
|
#include <xuiapp.h>
|
||||||
|
|
||||||
#include "rmenu_xui.h"
|
#include "rmenu_xui.h"
|
||||||
|
|
||||||
@ -46,6 +48,152 @@ enum {
|
|||||||
MENU_XUI_ITEM_QUIT_RARCH,
|
MENU_XUI_ITEM_QUIT_RARCH,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class CRetroArch : public CXuiModule
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
HXUIOBJ hMainScene;
|
||||||
|
HXUIOBJ hControlsMenu;
|
||||||
|
HXUIOBJ hFileBrowser;
|
||||||
|
HXUIOBJ hCoreBrowser;
|
||||||
|
HXUIOBJ hShaderBrowser;
|
||||||
|
HXUIOBJ hQuickMenu;
|
||||||
|
HXUIOBJ hRetroArchSettings;
|
||||||
|
protected:
|
||||||
|
virtual HRESULT RegisterXuiClasses();
|
||||||
|
virtual HRESULT UnregisterXuiClasses();
|
||||||
|
};
|
||||||
|
|
||||||
|
class CRetroArchMain: public CXuiSceneImpl
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
CXuiControl m_filebrowser;
|
||||||
|
CXuiControl m_quick_menu;
|
||||||
|
CXuiControl m_controls;
|
||||||
|
CXuiControl m_settings;
|
||||||
|
CXuiControl m_change_libretro_core;
|
||||||
|
CXuiControl m_quit;
|
||||||
|
CXuiTextElement m_title;
|
||||||
|
CXuiTextElement m_core;
|
||||||
|
CXuiControl m_logoimage;
|
||||||
|
public:
|
||||||
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||||
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||||
|
|
||||||
|
XUI_BEGIN_MSG_MAP()
|
||||||
|
XUI_ON_XM_INIT( OnInit)
|
||||||
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||||
|
XUI_END_MSG_MAP();
|
||||||
|
|
||||||
|
XUI_IMPLEMENT_CLASS(CRetroArchMain, L"RetroArchMain", XUI_CLASS_SCENE)
|
||||||
|
};
|
||||||
|
|
||||||
|
class CRetroArchFileBrowser: public CXuiSceneImpl
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
CXuiControl m_back;
|
||||||
|
CXuiControl m_dir_game;
|
||||||
|
public:
|
||||||
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||||
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||||
|
|
||||||
|
XUI_BEGIN_MSG_MAP()
|
||||||
|
XUI_ON_XM_INIT( OnInit)
|
||||||
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||||
|
XUI_END_MSG_MAP();
|
||||||
|
|
||||||
|
XUI_IMPLEMENT_CLASS(CRetroArchFileBrowser, L"RetroArchFileBrowser", XUI_CLASS_SCENE)
|
||||||
|
};
|
||||||
|
|
||||||
|
class CRetroArchCoreBrowser: public CXuiSceneImpl
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
CXuiControl m_back;
|
||||||
|
public:
|
||||||
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||||
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||||
|
|
||||||
|
XUI_BEGIN_MSG_MAP()
|
||||||
|
XUI_ON_XM_INIT( OnInit)
|
||||||
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||||
|
XUI_END_MSG_MAP();
|
||||||
|
|
||||||
|
XUI_IMPLEMENT_CLASS(CRetroArchCoreBrowser, L"RetroArchCoreBrowser", XUI_CLASS_SCENE)
|
||||||
|
};
|
||||||
|
|
||||||
|
class CRetroArchShaderBrowser: public CXuiSceneImpl
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
CXuiControl m_back;
|
||||||
|
public:
|
||||||
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||||
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||||
|
|
||||||
|
XUI_BEGIN_MSG_MAP()
|
||||||
|
XUI_ON_XM_INIT( OnInit)
|
||||||
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||||
|
XUI_END_MSG_MAP();
|
||||||
|
|
||||||
|
XUI_IMPLEMENT_CLASS(CRetroArchShaderBrowser, L"RetroArchShaderBrowser", XUI_CLASS_SCENE)
|
||||||
|
};
|
||||||
|
|
||||||
|
class CRetroArchQuickMenu: public CXuiSceneImpl
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
CXuiList m_quickmenulist;
|
||||||
|
CXuiControl m_back;
|
||||||
|
public:
|
||||||
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||||
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||||
|
HRESULT OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled);
|
||||||
|
|
||||||
|
XUI_BEGIN_MSG_MAP()
|
||||||
|
XUI_ON_XM_INIT( OnInit)
|
||||||
|
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
||||||
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||||
|
XUI_END_MSG_MAP();
|
||||||
|
|
||||||
|
XUI_IMPLEMENT_CLASS(CRetroArchQuickMenu, L"RetroArchQuickMenu", XUI_CLASS_SCENE)
|
||||||
|
};
|
||||||
|
|
||||||
|
class CRetroArchSettings: public CXuiSceneImpl
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
CXuiList m_settingslist;
|
||||||
|
CXuiControl m_back;
|
||||||
|
public:
|
||||||
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||||
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||||
|
HRESULT OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled);
|
||||||
|
|
||||||
|
XUI_BEGIN_MSG_MAP()
|
||||||
|
XUI_ON_XM_INIT( OnInit)
|
||||||
|
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
||||||
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||||
|
XUI_END_MSG_MAP();
|
||||||
|
|
||||||
|
XUI_IMPLEMENT_CLASS(CRetroArchSettings, L"RetroArchSettings", XUI_CLASS_SCENE)
|
||||||
|
};
|
||||||
|
|
||||||
|
class CRetroArchControls: public CXuiSceneImpl
|
||||||
|
{
|
||||||
|
protected:
|
||||||
|
CXuiList m_controlslist;
|
||||||
|
CXuiControl m_back;
|
||||||
|
CXuiSlider m_controlnoslider;
|
||||||
|
public:
|
||||||
|
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
||||||
|
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
||||||
|
HRESULT OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled);
|
||||||
|
|
||||||
|
XUI_BEGIN_MSG_MAP()
|
||||||
|
XUI_ON_XM_INIT( OnInit)
|
||||||
|
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
||||||
|
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
||||||
|
XUI_END_MSG_MAP();
|
||||||
|
|
||||||
|
XUI_IMPLEMENT_CLASS(CRetroArchControls, L"RetroArchControls", XUI_CLASS_SCENE)
|
||||||
|
};
|
||||||
|
|
||||||
CRetroArch app;
|
CRetroArch app;
|
||||||
CXuiList m_list;
|
CXuiList m_list;
|
||||||
CXuiTextElement m_list_path;
|
CXuiTextElement m_list_path;
|
||||||
@ -1383,3 +1531,10 @@ deinit:
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool menu_iterate_xui(void)
|
||||||
|
{
|
||||||
|
app.Render();
|
||||||
|
XuiTimersRun();
|
||||||
|
return true;
|
||||||
|
}
|
@ -17,9 +17,6 @@
|
|||||||
#ifndef _RMENU_XUI_H_
|
#ifndef _RMENU_XUI_H_
|
||||||
#define _RMENU_XUI_H_
|
#define _RMENU_XUI_H_
|
||||||
|
|
||||||
#include <xui.h>
|
|
||||||
#include <xuiapp.h>
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
SETTING_EMU_REWIND_ENABLED = 0,
|
SETTING_EMU_REWIND_ENABLED = 0,
|
||||||
@ -68,150 +65,6 @@ enum
|
|||||||
INPUT_LOOP_FILEBROWSER
|
INPUT_LOOP_FILEBROWSER
|
||||||
};
|
};
|
||||||
|
|
||||||
class CRetroArch : public CXuiModule
|
bool menu_iterate_xui(void);
|
||||||
{
|
|
||||||
public:
|
|
||||||
HXUIOBJ hMainScene;
|
|
||||||
HXUIOBJ hControlsMenu;
|
|
||||||
HXUIOBJ hFileBrowser;
|
|
||||||
HXUIOBJ hCoreBrowser;
|
|
||||||
HXUIOBJ hShaderBrowser;
|
|
||||||
HXUIOBJ hQuickMenu;
|
|
||||||
HXUIOBJ hRetroArchSettings;
|
|
||||||
protected:
|
|
||||||
virtual HRESULT RegisterXuiClasses();
|
|
||||||
virtual HRESULT UnregisterXuiClasses();
|
|
||||||
};
|
|
||||||
|
|
||||||
class CRetroArchMain: public CXuiSceneImpl
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
CXuiControl m_filebrowser;
|
|
||||||
CXuiControl m_quick_menu;
|
|
||||||
CXuiControl m_controls;
|
|
||||||
CXuiControl m_settings;
|
|
||||||
CXuiControl m_change_libretro_core;
|
|
||||||
CXuiControl m_quit;
|
|
||||||
CXuiTextElement m_title;
|
|
||||||
CXuiTextElement m_core;
|
|
||||||
CXuiControl m_logoimage;
|
|
||||||
public:
|
|
||||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
||||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
||||||
|
|
||||||
XUI_BEGIN_MSG_MAP()
|
|
||||||
XUI_ON_XM_INIT( OnInit)
|
|
||||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
||||||
XUI_END_MSG_MAP();
|
|
||||||
|
|
||||||
XUI_IMPLEMENT_CLASS(CRetroArchMain, L"RetroArchMain", XUI_CLASS_SCENE)
|
|
||||||
};
|
|
||||||
|
|
||||||
class CRetroArchFileBrowser: public CXuiSceneImpl
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
CXuiControl m_back;
|
|
||||||
CXuiControl m_dir_game;
|
|
||||||
public:
|
|
||||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
||||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
||||||
|
|
||||||
XUI_BEGIN_MSG_MAP()
|
|
||||||
XUI_ON_XM_INIT( OnInit)
|
|
||||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
||||||
XUI_END_MSG_MAP();
|
|
||||||
|
|
||||||
XUI_IMPLEMENT_CLASS(CRetroArchFileBrowser, L"RetroArchFileBrowser", XUI_CLASS_SCENE)
|
|
||||||
};
|
|
||||||
|
|
||||||
class CRetroArchCoreBrowser: public CXuiSceneImpl
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
CXuiControl m_back;
|
|
||||||
public:
|
|
||||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
||||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
||||||
|
|
||||||
XUI_BEGIN_MSG_MAP()
|
|
||||||
XUI_ON_XM_INIT( OnInit)
|
|
||||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
||||||
XUI_END_MSG_MAP();
|
|
||||||
|
|
||||||
XUI_IMPLEMENT_CLASS(CRetroArchCoreBrowser, L"RetroArchCoreBrowser", XUI_CLASS_SCENE)
|
|
||||||
};
|
|
||||||
|
|
||||||
class CRetroArchShaderBrowser: public CXuiSceneImpl
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
CXuiControl m_back;
|
|
||||||
public:
|
|
||||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
||||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
||||||
|
|
||||||
XUI_BEGIN_MSG_MAP()
|
|
||||||
XUI_ON_XM_INIT( OnInit)
|
|
||||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
||||||
XUI_END_MSG_MAP();
|
|
||||||
|
|
||||||
XUI_IMPLEMENT_CLASS(CRetroArchShaderBrowser, L"RetroArchShaderBrowser", XUI_CLASS_SCENE)
|
|
||||||
};
|
|
||||||
|
|
||||||
class CRetroArchQuickMenu: public CXuiSceneImpl
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
CXuiList m_quickmenulist;
|
|
||||||
CXuiControl m_back;
|
|
||||||
public:
|
|
||||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
||||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
||||||
HRESULT OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled);
|
|
||||||
|
|
||||||
XUI_BEGIN_MSG_MAP()
|
|
||||||
XUI_ON_XM_INIT( OnInit)
|
|
||||||
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
|
||||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
||||||
XUI_END_MSG_MAP();
|
|
||||||
|
|
||||||
XUI_IMPLEMENT_CLASS(CRetroArchQuickMenu, L"RetroArchQuickMenu", XUI_CLASS_SCENE)
|
|
||||||
};
|
|
||||||
|
|
||||||
class CRetroArchSettings: public CXuiSceneImpl
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
CXuiList m_settingslist;
|
|
||||||
CXuiControl m_back;
|
|
||||||
public:
|
|
||||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
||||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
||||||
HRESULT OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled);
|
|
||||||
|
|
||||||
XUI_BEGIN_MSG_MAP()
|
|
||||||
XUI_ON_XM_INIT( OnInit)
|
|
||||||
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
|
||||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
||||||
XUI_END_MSG_MAP();
|
|
||||||
|
|
||||||
XUI_IMPLEMENT_CLASS(CRetroArchSettings, L"RetroArchSettings", XUI_CLASS_SCENE)
|
|
||||||
};
|
|
||||||
|
|
||||||
class CRetroArchControls: public CXuiSceneImpl
|
|
||||||
{
|
|
||||||
protected:
|
|
||||||
CXuiList m_controlslist;
|
|
||||||
CXuiControl m_back;
|
|
||||||
CXuiSlider m_controlnoslider;
|
|
||||||
public:
|
|
||||||
HRESULT OnInit( XUIMessageInit* pInitData, int & bHandled );
|
|
||||||
HRESULT OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled );
|
|
||||||
HRESULT OnControlNavigate(XUIMessageControlNavigate *pControlNavigateData, BOOL& bHandled);
|
|
||||||
|
|
||||||
XUI_BEGIN_MSG_MAP()
|
|
||||||
XUI_ON_XM_INIT( OnInit)
|
|
||||||
XUI_ON_XM_CONTROL_NAVIGATE( OnControlNavigate )
|
|
||||||
XUI_ON_XM_NOTIFY_PRESS( OnNotifyPress )
|
|
||||||
XUI_END_MSG_MAP();
|
|
||||||
|
|
||||||
XUI_IMPLEMENT_CLASS(CRetroArchControls, L"RetroArchControls", XUI_CLASS_SCENE)
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -40,7 +40,6 @@
|
|||||||
unsigned font_x, font_y;
|
unsigned font_x, font_y;
|
||||||
#elif defined(_XBOX360)
|
#elif defined(_XBOX360)
|
||||||
#include "../frontend/menu/rmenu_xui.h"
|
#include "../frontend/menu/rmenu_xui.h"
|
||||||
extern CRetroArch app;
|
|
||||||
const DWORD g_MapLinearToSrgbGpuFormat[] =
|
const DWORD g_MapLinearToSrgbGpuFormat[] =
|
||||||
{
|
{
|
||||||
GPUTEXTUREFORMAT_1_REVERSE,
|
GPUTEXTUREFORMAT_1_REVERSE,
|
||||||
@ -892,8 +891,7 @@ static bool xdk_d3d_frame(void *data, const void *frame,
|
|||||||
if (lifecycle_mode_state & (1ULL << MODE_MENU_DRAW))
|
if (lifecycle_mode_state & (1ULL << MODE_MENU_DRAW))
|
||||||
{
|
{
|
||||||
#ifdef _XBOX360
|
#ifdef _XBOX360
|
||||||
app.Render();
|
menu_iterate_xui();
|
||||||
XuiTimersRun();
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user