mirror of
https://github.com/libretro/RetroArch
synced 2025-02-13 12:40:47 +00:00
(360) Added custom build steps
This commit is contained in:
parent
7374480126
commit
6614e4ef92
31
360/main.c
31
360/main.c
@ -22,43 +22,22 @@
|
||||
#include "menu.h"
|
||||
#include "xdk360_video.h"
|
||||
#include "../general.h"
|
||||
#include "shared.h"
|
||||
|
||||
CSSNES app;
|
||||
uint32_t mode_switch = MODE_MENU;
|
||||
|
||||
int ssnes_main(int argc, char *argv[]);
|
||||
|
||||
#undef main
|
||||
|
||||
int xui_init (void)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
xdk360_video_t *vid = (xdk360_video_t*)g_d3d;
|
||||
|
||||
hr = app.InitShared(vid->xdk360_render_device, &vid->d3dpp, XuiTextureLoader);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
OutputDebugString("Failed initializing XUI application.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Register font */
|
||||
hr = app.RegisterDefaultTypeface(L"Arial Unicode MS", L"file://game:/media/ssnes.ttf" );
|
||||
if (FAILED(hr))
|
||||
{
|
||||
OutputDebugString("Failed to register default typeface.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
//for devkits only, we will need to mount all partitions for retail
|
||||
//in a different way
|
||||
//DmMapDevkitDrive();
|
||||
ssnes_main_clear_state();
|
||||
|
||||
config_set_defaults();
|
||||
|
||||
xdk360_video_init();
|
||||
|
||||
|
BIN
360/media/ssnes.ttf
Normal file
BIN
360/media/ssnes.ttf
Normal file
Binary file not shown.
56
360/media/ssnes_main.xui
Normal file
56
360/media/ssnes_main.xui
Normal file
@ -0,0 +1,56 @@
|
||||
<XuiCanvas version="000c">
|
||||
<Properties>
|
||||
<Width>1920.000000</Width>
|
||||
<Height>1080.000000</Height>
|
||||
</Properties>
|
||||
<XuiScene>
|
||||
<Properties>
|
||||
<Id>XuiScene1</Id>
|
||||
<Width>410.000000</Width>
|
||||
<Height>251.000000</Height>
|
||||
<Position>759.300476,475.907898,0.000000</Position>
|
||||
<ClassOverride>SSNESMain</ClassOverride>
|
||||
</Properties>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnRomBrowser</Id>
|
||||
<Width>366.486145</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>21.158449,37.046692,0.000000</Position>
|
||||
<Text>ROM Browser</Text>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnSettings</Id>
|
||||
<Width>366.200134</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>21.799990,94.799988,0.000000</Position>
|
||||
<Text>Settings</Text>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
<XuiButton>
|
||||
<Properties>
|
||||
<Id>XuiBtnQuit</Id>
|
||||
<Width>362.600098</Width>
|
||||
<Height>38.000000</Height>
|
||||
<Position>22.799988,154.800049,0.000000</Position>
|
||||
<Text>Quit</Text>
|
||||
</Properties>
|
||||
</XuiButton>
|
||||
</XuiScene>
|
||||
<XuiText>
|
||||
<Properties>
|
||||
<Id>XuiText1</Id>
|
||||
<Width>240.000000</Width>
|
||||
<Height>40.000000</Height>
|
||||
<Position>770.766418,417.813141,0.000000</Position>
|
||||
<Text>SSNES 360</Text>
|
||||
<TextColor>0xff1054ce</TextColor>
|
||||
<DropShadowColor>0x800f0f0f</DropShadowColor>
|
||||
<PointSize>24.000000</PointSize>
|
||||
<Font>Arial Unicode MS</Font>
|
||||
<TextStyle>21</TextStyle>
|
||||
</Properties>
|
||||
</XuiText>
|
||||
</XuiCanvas>
|
16121
360/media/ssnes_main_skin.xui
Normal file
16121
360/media/ssnes_main_skin.xui
Normal file
File diff suppressed because it is too large
Load Diff
28
360/menu.cpp
28
360/menu.cpp
@ -17,8 +17,11 @@
|
||||
*/
|
||||
|
||||
#include <xtl.h>
|
||||
#include "xdk360_video.h"
|
||||
#include "menu.h"
|
||||
|
||||
CSSNES app;
|
||||
|
||||
/* Register custom classes */
|
||||
HRESULT CSSNES::RegisterXuiClasses (void)
|
||||
{
|
||||
@ -89,4 +92,29 @@ cleanup:
|
||||
XuiResourceClose(hResource);
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
int menu_init (void)
|
||||
{
|
||||
HRESULT hr;
|
||||
|
||||
xdk360_video_t *vid = (xdk360_video_t*)g_d3d;
|
||||
|
||||
hr = app.InitShared(vid->xdk360_render_device, &vid->d3dpp, XuiTextureLoader);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
OutputDebugString("Failed initializing XUI application.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Register font */
|
||||
hr = app.RegisterDefaultTypeface(L"Arial Unicode MS", L"file://game:/media/ssnes.ttf" );
|
||||
if (FAILED(hr))
|
||||
{
|
||||
OutputDebugString("Failed to register default typeface.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
@ -19,6 +19,8 @@ public:
|
||||
XUI_IMPLEMENT_CLASS(CSSNESMain, L"CSSNESMain", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
HRESULT APIENTRY XuiTextureLoader(IXuiDevice *pDevice, LPCWSTR szFileName, XUIImageInfo *pImageInfo, IDirect3DTexture9 **ppTex);
|
||||
int menu_init();
|
||||
|
||||
extern CSSNES app;
|
||||
|
||||
#endif
|
||||
|
@ -116,6 +116,8 @@
|
||||
</Link>
|
||||
<Deploy>
|
||||
<DeploymentType>CopyToHardDrive</DeploymentType>
|
||||
<DeploymentFiles>$(RemoteRoot)=$(ImagePath);$(RemoteRoot)\media=$(OutDir)media;$(RemoteRoot)\ssnes.cfg=$(OutDir)ssnes.cfg</DeploymentFiles>
|
||||
<ForceCopy>true</ForceCopy>
|
||||
</Deploy>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">
|
||||
@ -211,6 +213,8 @@
|
||||
</Link>
|
||||
<Deploy>
|
||||
<DeploymentType>CopyToHardDrive</DeploymentType>
|
||||
<DeploymentFiles>$(RemoteRoot)=$(ImagePath);$(RemoteRoot)\media=$(OutDir)media;$(RemoteRoot)\ssnes.cfg=$(OutDir)ssnes.cfg</DeploymentFiles>
|
||||
<ForceCopy>true</ForceCopy>
|
||||
</Deploy>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">
|
||||
@ -235,6 +239,12 @@
|
||||
<SetChecksum>true</SetChecksum>
|
||||
<AdditionalDependencies>xapilib.lib;d3d9ltcg.lib;d3dx9.lib;xgraphics.lib;xboxkrnl.lib;xnet.lib;xaudio2.lib;xact3ltcg.lib;x3daudioltcg.lib;xmcoreltcg.lib;vcomp.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
</Link>
|
||||
<Deploy>
|
||||
<ForceCopy>true</ForceCopy>
|
||||
</Deploy>
|
||||
<Deploy>
|
||||
<DeploymentFiles>$(RemoteRoot)=$(ImagePath);$(RemoteRoot)\media=$(OutDir)media;$(RemoteRoot)\ssnes.cfg=$(OutDir)ssnes.cfg</DeploymentFiles>
|
||||
</Deploy>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\360\main.c" />
|
||||
@ -302,7 +312,38 @@
|
||||
<ClInclude Include="..\..\thread.h" />
|
||||
<ClInclude Include="..\..\ups.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\360\media\ssnes.ttf">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">copy %(FullPath) $(OutDir)media\ssnes.ttf</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">$(OutDir)media\ssnes.ttf;%(Outputs)</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">$(OutDir)media\ssnes.ttf;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">copy %(FullPath) $(OutDir)media\ssnes.ttf</Command>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\360\media\ssnes_main_skin.xui">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">xuipkg /nologo /d /o "$(OutDir)media\ssnes.xzp" %(RelativeDir)\*</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">$(OutDir)media\ssnes.xzp;%(Outputs)</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">$(OutDir)media\ssnes.xzp;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">xuipkg /nologo /d /o "$(OutDir)media\ssnes.xzp" %(RelativeDir)\*</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">xuipkg /nologo /d /o "$(OutDir)media\ssnes.xzp" %(RelativeDir)\*</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">$(OutDir)media\ssnes.xzp;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\ssnes.cfg">
|
||||
<FileType>Document</FileType>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">$(OutDir)ssnes.cfg;%(Outputs)</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">copy %(FullPath) $(OutDir)ssnes.cfg</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">copy %(FullPath) $(OutDir)ssnes.cfg</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">copy %(FullPath) $(OutDir)ssnes.cfg</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">$(OutDir)ssnes.cfg;%(Outputs)</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">$(OutDir)ssnes.cfg;%(Outputs)</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
@ -27,6 +27,9 @@
|
||||
<Filter Include="Source Files\conf">
|
||||
<UniqueIdentifier>{82e8787f-e939-4783-82e1-fcab34285121}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\skin">
|
||||
<UniqueIdentifier>{b7d54b1f-ffda-45f9-8175-7bf67010253d}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\360\xdk360_video.cpp">
|
||||
@ -200,4 +203,15 @@
|
||||
<Filter>Header Files\conf</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\360\media\ssnes.ttf">
|
||||
<Filter>Source Files\skin</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\360\media\ssnes_main_skin.xui">
|
||||
<Filter>Source Files\skin</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\ssnes.cfg">
|
||||
<Filter>Source Files</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user