mirror of
https://github.com/libretro/RetroArch
synced 2025-02-12 09:40:06 +00:00
(360) Very rough shader selection in Settings menu - second pass doesn't work yet - blank screen - some memory leaks when loading a lot of shaders one after another
This commit is contained in:
parent
068b3b90f5
commit
9cd3db85aa
@ -50,6 +50,8 @@
|
||||
<NavDown>XuiBackButton</NavDown>
|
||||
<ItemsText>Rewind:
|
||||
Gamma Correction:
|
||||
Shader #1:
|
||||
Shader #2:
|
||||
Hardware filtering shader #1:
|
||||
Hardware filtering shader #2:
|
||||
Custom Scaling/Dual Shaders
|
||||
@ -151,6 +153,18 @@ Custom Scaling/Dual Shaders
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
</XuiCommonList>
|
||||
</XuiScene>
|
||||
</XuiCanvas>
|
||||
|
217
360/media/hd/rarch_shader_browser.xui
Normal file
217
360/media/hd/rarch_shader_browser.xui
Normal file
@ -0,0 +1,217 @@
|
||||
<XuiCanvas version="000c">
|
||||
<Properties>
|
||||
<Width>1280.000000</Width>
|
||||
<Height>720.000000</Height>
|
||||
</Properties>
|
||||
<XuiScene>
|
||||
<Properties>
|
||||
<Id>XuiSceneCoreFileBrowser</Id>
|
||||
<Width>920.000122</Width>
|
||||
<Height>552.000000</Height>
|
||||
<Position>176.000015,88.000015,0.000000</Position>
|
||||
<ClassOverride>RetroArchShaderBrowser</ClassOverride>
|
||||
</Properties>
|
||||
<XuiText>
|
||||
<Properties>
|
||||
<Id>XuiTxtTitle</Id>
|
||||
<Width>326.640015</Width>
|
||||
<Height>40.000000</Height>
|
||||
<Position>28.893612,12.519989,0.000000</Position>
|
||||
<Text>Shader selection - Select a shader</Text>
|
||||
<TextColor>0xff0f0f0f</TextColor>
|
||||
<DropShadowColor>0x800f0f0f</DropShadowColor>
|
||||
<Font>Arial Unicode MS</Font>
|
||||
<TextStyle>21</TextStyle>
|
||||
</Properties>
|
||||
</XuiText>
|
||||
<XuiCommonList>
|
||||
<Properties>
|
||||
<Id>XuiRomList</Id>
|
||||
<Width>857.200195</Width>
|
||||
<Height>406.400024</Height>
|
||||
<Position>22.799980,81.600006,0.000000</Position>
|
||||
<NavLeft>XuiBackButton1</NavLeft>
|
||||
<NavRight>XuiBackButton1</NavRight>
|
||||
<NavUp>XuiBackButton1</NavUp>
|
||||
<NavDown>XuiBackButton1</NavDown>
|
||||
</Properties>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
</XuiCommonList>
|
||||
<XuiBackButton>
|
||||
<Properties>
|
||||
<Id>XuiBackButton1</Id>
|
||||
<Width>219.000000</Width>
|
||||
<Height>36.000000</Height>
|
||||
<Position>680.000061,504.000061,0.000000</Position>
|
||||
<NavLeft>XuiRomList</NavLeft>
|
||||
<NavRight>XuiRomList</NavRight>
|
||||
<NavUp>XuiRomList</NavUp>
|
||||
<NavDown>XuiRomList</NavDown>
|
||||
<Text>Go back to menu</Text>
|
||||
<PressKey>22593</PressKey>
|
||||
</Properties>
|
||||
</XuiBackButton>
|
||||
<XuiText>
|
||||
<Properties>
|
||||
<Id>XuiTxtRomPath</Id>
|
||||
<Width>166.559998</Width>
|
||||
<Height>28.480011</Height>
|
||||
<Position>96.000000,42.480011,0.000000</Position>
|
||||
<TextColor>0xff0f0f0f</TextColor>
|
||||
<DropShadowColor>0x800f0f0f</DropShadowColor>
|
||||
</Properties>
|
||||
</XuiText>
|
||||
<XuiLabel>
|
||||
<Properties>
|
||||
<Id>XuiLblPath</Id>
|
||||
<Width>72.880005</Width>
|
||||
<Height>28.000000</Height>
|
||||
<Position>26.000000,43.000000,0.000000</Position>
|
||||
<Text>PATH:</Text>
|
||||
</Properties>
|
||||
</XuiLabel>
|
||||
</XuiScene>
|
||||
</XuiCanvas>
|
@ -50,6 +50,8 @@
|
||||
<NavDown>XuiBackButton</NavDown>
|
||||
<ItemsText>Rewind:
|
||||
Gamma Correction:
|
||||
Shader #1:
|
||||
Shader #2:
|
||||
Hardware filtering shader #1:
|
||||
Hardware filtering shader #2:
|
||||
Cutom Scaling/Dual Shaders:
|
||||
@ -127,6 +129,18 @@ Cutom Scaling/Dual Shaders:
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
</XuiCommonList>
|
||||
</XuiScene>
|
||||
</XuiCanvas>
|
||||
|
193
360/media/sd/rarch_shader_browser.xui
Normal file
193
360/media/sd/rarch_shader_browser.xui
Normal file
@ -0,0 +1,193 @@
|
||||
<XuiCanvas version="000c">
|
||||
<Properties>
|
||||
<Width>1280.000000</Width>
|
||||
<Height>720.000000</Height>
|
||||
</Properties>
|
||||
<XuiScene>
|
||||
<Properties>
|
||||
<Id>XuiSceneCoreFileBrowser</Id>
|
||||
<Width>575.888062</Width>
|
||||
<Height>336.017609</Height>
|
||||
<Position>353.995880,209.035965,0.000000</Position>
|
||||
<ClassOverride>RetroArchShaderBrowser</ClassOverride>
|
||||
</Properties>
|
||||
<XuiText>
|
||||
<Properties>
|
||||
<Id>XuiTxtTitle</Id>
|
||||
<Width>326.640015</Width>
|
||||
<Height>40.000000</Height>
|
||||
<Position>28.893612,12.519989,0.000000</Position>
|
||||
<Text>Shader selection - Select a shader</Text>
|
||||
<TextColor>0xff0f0f0f</TextColor>
|
||||
<DropShadowColor>0x800f0f0f</DropShadowColor>
|
||||
<Font>Arial Unicode MS</Font>
|
||||
<TextStyle>21</TextStyle>
|
||||
</Properties>
|
||||
</XuiText>
|
||||
<XuiCommonList>
|
||||
<Properties>
|
||||
<Id>XuiRomList</Id>
|
||||
<Width>536.582458</Width>
|
||||
<Height>170.800018</Height>
|
||||
<Position>22.799980,81.600006,0.000000</Position>
|
||||
<NavLeft>XuiBackButton1</NavLeft>
|
||||
<NavRight>XuiBackButton1</NavRight>
|
||||
<NavUp>XuiBackButton1</NavUp>
|
||||
<NavDown>XuiBackButton1</NavDown>
|
||||
</Properties>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
<XuiListItem>
|
||||
<Properties>
|
||||
<Id>control_ListItem</Id>
|
||||
<Width>226.000000</Width>
|
||||
<Height>45.000000</Height>
|
||||
<Position>7.000000,22.000000,0.000000</Position>
|
||||
<Anchor>5</Anchor>
|
||||
<Show>false</Show>
|
||||
<Visual>XuiButton</Visual>
|
||||
<InterItemSpacing>0.000000,10.000000,0.000000</InterItemSpacing>
|
||||
</Properties>
|
||||
</XuiListItem>
|
||||
</XuiCommonList>
|
||||
<XuiBackButton>
|
||||
<Properties>
|
||||
<Id>XuiBackButton1</Id>
|
||||
<Width>219.000000</Width>
|
||||
<Height>36.000000</Height>
|
||||
<Position>338.715210,281.396820,0.000000</Position>
|
||||
<NavLeft>XuiRomList</NavLeft>
|
||||
<NavRight>XuiRomList</NavRight>
|
||||
<NavUp>XuiRomList</NavUp>
|
||||
<NavDown>XuiRomList</NavDown>
|
||||
<Text>Go back to menu</Text>
|
||||
<PressKey>22593</PressKey>
|
||||
</Properties>
|
||||
</XuiBackButton>
|
||||
<XuiText>
|
||||
<Properties>
|
||||
<Id>XuiTxtRomPath</Id>
|
||||
<Width>166.559998</Width>
|
||||
<Height>28.480011</Height>
|
||||
<Position>96.000000,42.480011,0.000000</Position>
|
||||
<TextColor>0xff0f0f0f</TextColor>
|
||||
<DropShadowColor>0x800f0f0f</DropShadowColor>
|
||||
</Properties>
|
||||
</XuiText>
|
||||
<XuiLabel>
|
||||
<Properties>
|
||||
<Id>XuiLblPath</Id>
|
||||
<Width>72.880005</Width>
|
||||
<Height>28.000000</Height>
|
||||
<Position>26.000000,43.000000,0.000000</Position>
|
||||
<Text>PATH:</Text>
|
||||
</Properties>
|
||||
</XuiLabel>
|
||||
</XuiScene>
|
||||
</XuiCanvas>
|
82
360/menu.cpp
82
360/menu.cpp
@ -30,6 +30,8 @@ CRetroArch app;
|
||||
filebrowser_t browser;
|
||||
filebrowser_t tmp_browser;
|
||||
char strbuffer[1024];
|
||||
bool hdmenus_allowed;
|
||||
uint32_t set_shader = 0;
|
||||
|
||||
static void return_to_game (void)
|
||||
{
|
||||
@ -51,6 +53,7 @@ HRESULT CRetroArch::RegisterXuiClasses (void)
|
||||
CRetroArchMain::Register();
|
||||
CRetroArchFileBrowser::Register();
|
||||
CRetroArchCoreBrowser::Register();
|
||||
CRetroArchShaderBrowser::Register();
|
||||
CRetroArchQuickMenu::Register();
|
||||
CRetroArchSettings::Register();
|
||||
|
||||
@ -62,6 +65,7 @@ HRESULT CRetroArch::UnregisterXuiClasses (void)
|
||||
{
|
||||
CRetroArchMain::Unregister();
|
||||
CRetroArchCoreBrowser::Unregister();
|
||||
CRetroArchShaderBrowser::Unregister();
|
||||
CRetroArchFileBrowser::Unregister();
|
||||
CRetroArchQuickMenu::Register();
|
||||
CRetroArchSettings::Unregister();
|
||||
@ -116,6 +120,18 @@ HRESULT CRetroArchCoreBrowser::OnInit(XUIMessageInit * pInitData, BOOL& bHandled
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRetroArchShaderBrowser::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
{
|
||||
GetChildById(L"XuiRomList", &m_shaderlist);
|
||||
GetChildById(L"XuiBackButton1", &m_back);
|
||||
GetChildById(L"XuiTxtRomPath", &m_shaderpathtitle);
|
||||
|
||||
filebrowser_new(&tmp_browser, "game:", "cg|CG");
|
||||
filebrowser_fetch_directory_entries("game:", &tmp_browser, &m_shaderlist, &m_shaderpathtitle);
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRetroArchSettings::OnInit(XUIMessageInit * pInitData, BOOL& bHandled)
|
||||
{
|
||||
GetChildById(L"XuiSettingsList", &m_settingslist);
|
||||
@ -348,6 +364,47 @@ HRESULT CRetroArchFileBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandle
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRetroArchShaderBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
|
||||
{
|
||||
char path[MAX_PATH_LENGTH];
|
||||
|
||||
if(hObjPressed == m_shaderlist)
|
||||
{
|
||||
int index = m_shaderlist.GetCurSel();
|
||||
if(tmp_browser.cur[index].d_type != FILE_ATTRIBUTE_DIRECTORY)
|
||||
{
|
||||
memset(strbuffer, 0, sizeof(strbuffer));
|
||||
wcstombs(strbuffer, (const wchar_t *)m_shaderlist.GetText(index), sizeof(strbuffer));
|
||||
switch(set_shader)
|
||||
{
|
||||
case 1:
|
||||
sprintf(g_settings.video.cg_shader_path, "%s\\%s", FILEBROWSER_GET_CURRENT_DIRECTORY_NAME(tmp_browser), strbuffer);
|
||||
hlsl_load_shader(set_shader, g_settings.video.cg_shader_path);
|
||||
break;
|
||||
case 2:
|
||||
sprintf(g_settings.video.second_pass_shader, "%s\\%s", FILEBROWSER_GET_CURRENT_DIRECTORY_NAME(tmp_browser), strbuffer);
|
||||
hlsl_load_shader(set_shader, g_settings.video.second_pass_shader);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if(tmp_browser.cur[index].d_type == FILE_ATTRIBUTE_DIRECTORY)
|
||||
{
|
||||
memset(strbuffer, 0, sizeof(strbuffer));
|
||||
wcstombs(strbuffer, (const wchar_t *)m_shaderlist.GetText(index), sizeof(strbuffer));
|
||||
snprintf(path, sizeof(path), "%s\\%s", FILEBROWSER_GET_CURRENT_DIRECTORY_NAME(tmp_browser), strbuffer);
|
||||
filebrowser_fetch_directory_entries(path, &tmp_browser, &m_shaderlist, &m_shaderpathtitle);
|
||||
}
|
||||
}
|
||||
else if(hObjPressed == m_back)
|
||||
NavigateBack(app.hRetroArchSettings);
|
||||
|
||||
bHandled = TRUE;
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CRetroArchCoreBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
|
||||
{
|
||||
char path[MAX_PATH_LENGTH];
|
||||
@ -355,7 +412,7 @@ HRESULT CRetroArchCoreBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandle
|
||||
if(hObjPressed == m_romlist)
|
||||
{
|
||||
int index = m_romlist.GetCurSel();
|
||||
if(browser.cur[index].d_type != FILE_ATTRIBUTE_DIRECTORY)
|
||||
if(tmp_browser.cur[index].d_type != FILE_ATTRIBUTE_DIRECTORY)
|
||||
{
|
||||
memset(strbuffer, 0, sizeof(strbuffer));
|
||||
wcstombs(strbuffer, (const wchar_t *)m_romlist.GetText(index), sizeof(strbuffer));
|
||||
@ -382,6 +439,7 @@ HRESULT CRetroArchCoreBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandle
|
||||
HRESULT CRetroArchSettings::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled )
|
||||
{
|
||||
int current_index;
|
||||
HRESULT hr;
|
||||
|
||||
if ( hObjPressed == m_settingslist)
|
||||
{
|
||||
@ -397,6 +455,26 @@ HRESULT CRetroArchSettings::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled
|
||||
g_console.gamma_correction_enable = !g_console.gamma_correction_enable;
|
||||
m_settingslist.SetText(SETTING_GAMMA_CORRECTION_ENABLED, g_console.gamma_correction_enable ? L"Gamma correction: ON" : L"Gamma correction: OFF");
|
||||
break;
|
||||
case SETTING_SHADER:
|
||||
set_shader = 1;
|
||||
hr = XuiSceneCreate(hdmenus_allowed ? L"file://game:/media/hd/" : L"file://game:/media/sd/", L"rarch_shader_browser.xur", NULL, &app.hShaderBrowser);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("Failed to load scene.\n");
|
||||
}
|
||||
NavigateForward(app.hShaderBrowser);
|
||||
break;
|
||||
case SETTING_SHADER_2:
|
||||
set_shader = 2;
|
||||
hr = XuiSceneCreate(hdmenus_allowed ? L"file://game:/media/hd/" : L"file://game:/media/sd/", L"rarch_shader_browser.xur", NULL, &app.hShaderBrowser);
|
||||
|
||||
if (FAILED(hr))
|
||||
{
|
||||
RARCH_ERR("Failed to load scene.\n");
|
||||
}
|
||||
NavigateForward(app.hShaderBrowser);
|
||||
break;
|
||||
case SETTING_HW_TEXTURE_FILTER:
|
||||
g_settings.video.smooth = !g_settings.video.smooth;
|
||||
m_settingslist.SetText(SETTING_HW_TEXTURE_FILTER, g_settings.video.smooth ? L"Hardware filtering shader #1: Linear interpolation" : L"Hardware filtering shader #1: Point filtering");
|
||||
@ -424,7 +502,7 @@ HRESULT CRetroArchMain::OnNotifyPress( HXUIOBJ hObjPressed, int & bHandled )
|
||||
{
|
||||
xdk360_video_t *vid = (xdk360_video_t*)g_d3d;
|
||||
|
||||
bool hdmenus_allowed = vid->video_mode.fIsHiDef && (g_console.aspect_ratio_index >= ASPECT_RATIO_16_9);
|
||||
hdmenus_allowed = vid->video_mode.fIsHiDef && (g_console.aspect_ratio_index >= ASPECT_RATIO_16_9);
|
||||
|
||||
HRESULT hr;
|
||||
|
||||
|
21
360/menu.h
21
360/menu.h
@ -24,6 +24,8 @@ enum
|
||||
{
|
||||
SETTING_EMU_REWIND_ENABLED = 0,
|
||||
SETTING_GAMMA_CORRECTION_ENABLED,
|
||||
SETTING_SHADER,
|
||||
SETTING_SHADER_2,
|
||||
SETTING_HW_TEXTURE_FILTER,
|
||||
SETTING_HW_TEXTURE_FILTER_2,
|
||||
SETTING_SCALE_ENABLED
|
||||
@ -35,6 +37,7 @@ public:
|
||||
HXUIOBJ hMainScene;
|
||||
HXUIOBJ hFileBrowser;
|
||||
HXUIOBJ hCoreBrowser;
|
||||
HXUIOBJ hShaderBrowser;
|
||||
HXUIOBJ hQuickMenu;
|
||||
HXUIOBJ hRetroArchSettings;
|
||||
protected:
|
||||
@ -105,6 +108,24 @@ public:
|
||||
XUI_IMPLEMENT_CLASS(CRetroArchCoreBrowser, L"RetroArchCoreBrowser", XUI_CLASS_SCENE)
|
||||
};
|
||||
|
||||
class CRetroArchShaderBrowser: public CXuiSceneImpl
|
||||
{
|
||||
protected:
|
||||
CXuiList m_shaderlist;
|
||||
CXuiControl m_back;
|
||||
CXuiTextElement m_shaderpathtitle;
|
||||
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:
|
||||
|
@ -141,11 +141,6 @@ static bool load_program(unsigned index, const char *prog, bool path_is_file)
|
||||
ret_fp = false;
|
||||
ret_vp = false;
|
||||
|
||||
if (prg[index].f_ctable)
|
||||
prg[index].f_ctable->Release();
|
||||
if (prg[index].v_ctable)
|
||||
prg[index].v_ctable->Release();
|
||||
|
||||
if (path_is_file)
|
||||
{
|
||||
ret_fp = D3DXCompileShaderFromFile(prog, NULL, NULL,
|
||||
@ -174,11 +169,6 @@ static bool load_program(unsigned index, const char *prog, bool path_is_file)
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (prg[index].fprg)
|
||||
prg[index].fprg->Release();
|
||||
if (prg[index].vprg)
|
||||
prg[index].vprg->Release();
|
||||
|
||||
d3d_device_ptr->CreatePixelShader((const DWORD*)code_f->GetBufferPointer(), &prg[index].fprg);
|
||||
d3d_device_ptr->CreateVertexShader((const DWORD*)code_v->GetBufferPointer(), &prg[index].vprg);
|
||||
code_f->Release();
|
||||
@ -203,6 +193,76 @@ static bool load_stock(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
static void set_program_attributes(unsigned i)
|
||||
{
|
||||
prg[i].vid_size_f = prg[i].f_ctable->GetConstantByName(NULL, "$IN.video_size");
|
||||
prg[i].tex_size_f = prg[i].f_ctable->GetConstantByName(NULL, "$IN.texture_size");
|
||||
prg[i].out_size_f = prg[i].f_ctable->GetConstantByName(NULL, "$IN.output_size");
|
||||
prg[i].frame_cnt_f = prg[i].f_ctable->GetConstantByName(NULL, "$IN.frame_count");
|
||||
prg[i].frame_dir_f = prg[i].f_ctable->GetConstantByName(NULL, "$IN.frame_direction");
|
||||
prg[i].vid_size_v = prg[i].v_ctable->GetConstantByName(NULL, "$IN.video_size");
|
||||
prg[i].tex_size_v = prg[i].v_ctable->GetConstantByName(NULL, "$IN.texture_size");
|
||||
prg[i].out_size_v = prg[i].v_ctable->GetConstantByName(NULL, "$IN.output_size");
|
||||
prg[i].frame_cnt_v = prg[i].v_ctable->GetConstantByName(NULL, "$IN.frame_count");
|
||||
prg[i].frame_dir_v = prg[i].v_ctable->GetConstantByName(NULL, "$IN.frame_direction");
|
||||
prg[i].mvp = prg[i].v_ctable->GetConstantByName(NULL, "$modelViewProj");
|
||||
}
|
||||
|
||||
bool hlsl_load_shader(unsigned index, const char *path)
|
||||
{
|
||||
bool retval = true;
|
||||
|
||||
if (!hlsl_active || index == 0)
|
||||
retval = false;
|
||||
|
||||
if(retval)
|
||||
{
|
||||
//check if fragment program already exists
|
||||
if (prg[index].fprg)
|
||||
{
|
||||
if (prg[index].fprg)
|
||||
prg[index].fprg->Release();
|
||||
|
||||
if (prg[index].f_ctable)
|
||||
prg[index].f_ctable->Release();
|
||||
}
|
||||
|
||||
//check if vertex program already exists
|
||||
if (prg[index].vprg)
|
||||
{
|
||||
if (prg[index].vprg)
|
||||
prg[index].vprg->Release();
|
||||
|
||||
if (prg[index].v_ctable)
|
||||
prg[index].v_ctable->Release();
|
||||
}
|
||||
|
||||
if (path)
|
||||
{
|
||||
if (load_program(index, path, true))
|
||||
{
|
||||
set_program_attributes(index);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Always make sure we have a valid shader.
|
||||
prg[index] = prg[0];
|
||||
retval = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
prg[index] = prg[0];
|
||||
}
|
||||
else
|
||||
goto end; // if retval is false, skip to end label
|
||||
|
||||
hlsl_active = true;
|
||||
d3d_device_ptr->SetVertexShader(prg[index].vprg);
|
||||
d3d_device_ptr->SetPixelShader(prg[index].fprg);
|
||||
end:
|
||||
return retval;
|
||||
}
|
||||
|
||||
static bool load_plain(const char *path)
|
||||
{
|
||||
if (!load_stock())
|
||||
@ -264,21 +324,6 @@ static bool load_preset(const char *path)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void set_program_attributes(unsigned i)
|
||||
{
|
||||
prg[i].vid_size_f = prg[i].f_ctable->GetConstantByName(NULL, "$IN.video_size");
|
||||
prg[i].tex_size_f = prg[i].f_ctable->GetConstantByName(NULL, "$IN.texture_size");
|
||||
prg[i].out_size_f = prg[i].f_ctable->GetConstantByName(NULL, "$IN.output_size");
|
||||
prg[i].frame_cnt_f = prg[i].f_ctable->GetConstantByName(NULL, "$IN.frame_count");
|
||||
prg[i].frame_dir_f = prg[i].f_ctable->GetConstantByName(NULL, "$IN.frame_direction");
|
||||
prg[i].vid_size_v = prg[i].v_ctable->GetConstantByName(NULL, "$IN.video_size");
|
||||
prg[i].tex_size_v = prg[i].v_ctable->GetConstantByName(NULL, "$IN.texture_size");
|
||||
prg[i].out_size_v = prg[i].v_ctable->GetConstantByName(NULL, "$IN.output_size");
|
||||
prg[i].frame_cnt_v = prg[i].v_ctable->GetConstantByName(NULL, "$IN.frame_count");
|
||||
prg[i].frame_dir_v = prg[i].v_ctable->GetConstantByName(NULL, "$IN.frame_direction");
|
||||
prg[i].mvp = prg[i].v_ctable->GetConstantByName(NULL, "$modelViewProj");
|
||||
}
|
||||
|
||||
bool hlsl_init(const char *path, IDirect3DDevice9 * device_ptr)
|
||||
{
|
||||
if (!device_ptr)
|
||||
|
@ -34,6 +34,8 @@ void hlsl_set_params(unsigned width, unsigned height,
|
||||
|
||||
void hlsl_use(unsigned index);
|
||||
|
||||
bool hlsl_load_shader(unsigned index, const char *path);
|
||||
|
||||
#define RARCH_HLSL_MAX_SHADERS 16
|
||||
|
||||
#endif
|
||||
|
@ -647,6 +647,38 @@
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">$(OutDir)media\hd\rarch_settings.xur;</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<CustomBuild Include="..\..\360\media\hd\rarch_shader_browser.xui">
|
||||
<FileType>Document</FileType>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">$(OutDir)media\hd\rarch_shader_browser.xur</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">$(OutDir)media\hd\rarch_shader_browser.xur</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">$(OutDir)media\hd\rarch_shader_browser.xur</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">$(OutDir)media\hd\rarch_shader_browser.xur</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">$(OutDir)media\hd\rarch_shader_browser.xur</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">$(OutDir)media\hd\rarch_shader_browser.xur</Outputs>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)rarch_shader_browser.xui" "$(OutDir)media\hd\rarch_shader_browser.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)rarch_shader_browser.xui" "$(OutDir)media\hd\rarch_shader_browser.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)rarch_shader_browser.xui" "$(OutDir)media\hd\rarch_shader_browser.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)rarch_shader_browser.xui" "$(OutDir)media\hd\rarch_shader_browser.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)rarch_shader_browser.xui" "$(OutDir)media\hd\rarch_shader_browser.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)rarch_shader_browser.xui" "$(OutDir)media\hd\rarch_shader_browser.xur"</Command>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\360\media\sd\rarch_shader_browser.xui">
|
||||
<FileType>Document</FileType>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)rarch_shader_browser.xui" "$(OutDir)media\sd\rarch_shader_browser.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)rarch_shader_browser.xui" "$(OutDir)media\sd\rarch_shader_browser.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)rarch_shader_browser.xui" "$(OutDir)media\sd\rarch_shader_browser.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)rarch_shader_browser.xui" "$(OutDir)media\sd\rarch_shader_browser.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)rarch_shader_browser.xui" "$(OutDir)media\sd\rarch_shader_browser.xur"</Command>
|
||||
<Command Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">xui2bin /D /NOLOGO "%(RelativeDir)rarch_shader_browser.xui" "$(OutDir)media\sd\rarch_shader_browser.xur"</Command>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='CodeAnalysis|Xbox 360'">$(OutDir)media\sd\rarch_shader_browser.xur;</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Xbox 360'">$(OutDir)media\sd\rarch_shader_browser.xur;</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Profile|Xbox 360'">$(OutDir)media\sd\rarch_shader_browser.xur;</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Profile_FastCap|Xbox 360'">$(OutDir)media\sd\rarch_shader_browser.xur;</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Xbox 360'">$(OutDir)media\sd\rarch_shader_browser.xur;</Outputs>
|
||||
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release_LTCG|Xbox 360'">$(OutDir)media\sd\rarch_shader_browser.xur;</Outputs>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
@ -27,9 +27,6 @@
|
||||
<Filter Include="Source Files\console\rzlib">
|
||||
<UniqueIdentifier>{60603fec-c1c0-4562-8573-b1dc3af0ee40}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\media\shader">
|
||||
<UniqueIdentifier>{3a05047b-b9ec-4821-bb28-d1b0e9e3e8bb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\compat">
|
||||
<UniqueIdentifier>{cf25b88e-c7b2-4823-876a-ed0dd8020821}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@ -42,6 +39,9 @@
|
||||
<Filter Include="Source Files\media\hd">
|
||||
<UniqueIdentifier>{76fa04d8-4379-4b8c-ae79-2aa78d380e06}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\media\shaders">
|
||||
<UniqueIdentifier>{3a05047b-b9ec-4821-bb28-d1b0e9e3e8bb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\console\rzlib\rzlib.c">
|
||||
@ -148,7 +148,7 @@
|
||||
<Filter>Source Files\media</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\360\media\shaders\stock.cg">
|
||||
<Filter>Source Files\media\shader</Filter>
|
||||
<Filter>Source Files\media\shaders</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\360\media\sd\rarch_filebrowser.xui">
|
||||
<Filter>Source Files\media\sd</Filter>
|
||||
@ -186,5 +186,11 @@
|
||||
<CustomBuild Include="..\..\360\media\rarch_scene_skin.xui">
|
||||
<Filter>Source Files\media</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\360\media\sd\rarch_shader_browser.xui">
|
||||
<Filter>Source Files\media\sd</Filter>
|
||||
</CustomBuild>
|
||||
<CustomBuild Include="..\..\360\media\hd\rarch_shader_browser.xui">
|
||||
<Filter>Source Files\media\hd</Filter>
|
||||
</CustomBuild>
|
||||
</ItemGroup>
|
||||
</Project>
|
Loading…
x
Reference in New Issue
Block a user