mirror of
https://github.com/libretro/RetroArch
synced 2025-04-11 00:44:20 +00:00
(Xbox 1) Fixed rom list/text position in 720p
(Xbox 1) Fixed 720p background image problem (loads native 720p image now)
This commit is contained in:
parent
d1d10eefdf
commit
3c1a55dce4
BIN
xbox1/Media/menuMainBG_720p.png
Normal file
BIN
xbox1/Media/menuMainBG_720p.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
@ -36,21 +36,38 @@ bool CMenuMain::Create()
|
|||||||
{
|
{
|
||||||
RARCH_LOG("CMenuMain::Create().");
|
RARCH_LOG("CMenuMain::Create().");
|
||||||
|
|
||||||
|
xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data;
|
||||||
|
|
||||||
|
width = d3d->d3dpp.BackBufferWidth;
|
||||||
|
//height = d3d->d3dpp.BackBufferHeight;
|
||||||
|
|
||||||
// Title coords with color
|
// Title coords with color
|
||||||
m_menuMainTitle_x = 305;
|
m_menuMainTitle_x = 305;
|
||||||
m_menuMainTitle_y = 30;
|
m_menuMainTitle_y = 30;
|
||||||
m_menuMainTitle_c = 0xFFFFFFFF;
|
m_menuMainTitle_c = 0xFFFFFFFF;
|
||||||
|
|
||||||
// Load background image
|
|
||||||
m_menuMainBG.Create("D:\\Media\\menuMainBG.png");
|
|
||||||
m_menuMainBG_x = 0;
|
m_menuMainBG_x = 0;
|
||||||
m_menuMainBG_y = 0;
|
m_menuMainBG_y = 0;
|
||||||
m_menuMainBG_w = 640;
|
//m_menuMainBG_w = width;
|
||||||
m_menuMainBG_h = 480;
|
//m_menuMainBG_h = height;
|
||||||
|
|
||||||
|
// Quick hack to properly center the romlist in 720p,
|
||||||
|
// it might need more work though (font size and rom selector size -> needs more memory)
|
||||||
// Init rom list coords
|
// Init rom list coords
|
||||||
m_menuMainRomListPos_x = 100;
|
// Load background image
|
||||||
m_menuMainRomListPos_y = 100;
|
if(width == 640)
|
||||||
|
{
|
||||||
|
m_menuMainBG.Create("D:\\Media\\menuMainBG.png");
|
||||||
|
m_menuMainRomListPos_x = 100;
|
||||||
|
m_menuMainRomListPos_y = 100;
|
||||||
|
}
|
||||||
|
else if(width == 1280)
|
||||||
|
{
|
||||||
|
m_menuMainBG.Create("D:\\Media\\menuMainBG_720p.png");
|
||||||
|
m_menuMainRomListPos_x = 400;
|
||||||
|
m_menuMainRomListPos_y = 150;
|
||||||
|
}
|
||||||
|
|
||||||
m_menuMainRomListSpacing = 20;
|
m_menuMainRomListSpacing = 20;
|
||||||
|
|
||||||
// Load rom selector panel
|
// Load rom selector panel
|
||||||
@ -93,7 +110,11 @@ void CMenuMain::Render()
|
|||||||
m_menuMainBG.Render(m_menuMainBG_x, m_menuMainBG_y);
|
m_menuMainBG.Render(m_menuMainBG_x, m_menuMainBG_y);
|
||||||
|
|
||||||
//Display some text
|
//Display some text
|
||||||
g_font.Render("Press RSTICK THUMB to exit. Press START and/or A to launch a rom.", 65, 430, 16, XFONT_NORMAL, m_menuMainTitle_c);
|
//Center the text (hardcoded)
|
||||||
|
int xpos = width == 640 ? 65 : 400;
|
||||||
|
int ypos = width == 640 ? 430 : 670;
|
||||||
|
|
||||||
|
g_font.Render("Press RSTICK THUMB to exit. Press START and/or A to launch a rom.", xpos, ypos, 16, XFONT_NORMAL, m_menuMainTitle_c);
|
||||||
|
|
||||||
//Begin with the rom selector panel
|
//Begin with the rom selector panel
|
||||||
//FIXME: Width/Height needs to be current Rom texture width/height (or should we just leave it at a fixed size?)
|
//FIXME: Width/Height needs to be current Rom texture width/height (or should we just leave it at a fixed size?)
|
||||||
|
@ -73,6 +73,10 @@ int m_romListEndRender;
|
|||||||
int m_romListSelectedRom;
|
int m_romListSelectedRom;
|
||||||
int m_romListOffset;
|
int m_romListOffset;
|
||||||
|
|
||||||
|
// Backbuffer width, height
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CMenuMain g_menuMain;
|
extern CMenuMain g_menuMain;
|
||||||
|
@ -64,7 +64,7 @@ void menu_loop(void)
|
|||||||
1.0f, 0);
|
1.0f, 0);
|
||||||
|
|
||||||
d3d->d3d_render_device->BeginScene();
|
d3d->d3d_render_device->BeginScene();
|
||||||
d3d->d3d_render_device->SetFlickerFilter(5);
|
d3d->d3d_render_device->SetFlickerFilter(1);
|
||||||
d3d->d3d_render_device->SetSoftDisplayFilter(1);
|
d3d->d3d_render_device->SetSoftDisplayFilter(1);
|
||||||
|
|
||||||
//g_input.GetInput();
|
//g_input.GetInput();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user