diff --git a/xbox1/RetroLaunch/MenuMain.cpp b/xbox1/RetroLaunch/MenuMain.cpp index f25952f92d..ba7dc1d869 100644 --- a/xbox1/RetroLaunch/MenuMain.cpp +++ b/xbox1/RetroLaunch/MenuMain.cpp @@ -42,7 +42,7 @@ bool CMenuMain::Create() m_menuMainTitle_c = 0xFFFFFFFF; // Load background image - m_menuMainBG.Create("Media\\menuMainBG.png"); + m_menuMainBG.Create("D:\\Media\\menuMainBG.png"); m_menuMainBG_x = 0; m_menuMainBG_y = 0; m_menuMainBG_w = 640; @@ -54,7 +54,7 @@ bool CMenuMain::Create() m_menuMainRomListSpacing = 20; // Load rom selector panel - m_menuMainRomSelectPanel.Create("Media\\menuMainRomSelectPanel.png"); + m_menuMainRomSelectPanel.Create("D:\\Media\\menuMainRomSelectPanel.png"); m_menuMainRomSelectPanel_x = m_menuMainRomListPos_x - 5; m_menuMainRomSelectPanel_y = m_menuMainRomListPos_y - 2; m_menuMainRomSelectPanel_w = 440; diff --git a/xbox1/RetroLaunch/RomList.cpp b/xbox1/RetroLaunch/RomList.cpp index bca48369d1..c563173704 100644 --- a/xbox1/RetroLaunch/RomList.cpp +++ b/xbox1/RetroLaunch/RomList.cpp @@ -34,13 +34,6 @@ RomList::~RomList(void) Destroy(); } -void RomList::Load() -{ - Build(); - - m_bLoaded = true; -} - void RomList::Refresh() { Destroy(); @@ -117,21 +110,6 @@ Rom *RomList::GetRomAt(int index) return m_romList[index]; } -int RomList::FindRom(Rom *rom, int mode) -{ - vector *pList; - - pList = &m_romList; - - for (int i = 0; i < static_cast(pList->size()); i++) - { - if (rom == (*pList)[i]) - return i; - } - - return -1; -} - void RomList::CleanUpTextures() { if (!IsLoaded()) @@ -139,14 +117,10 @@ void RomList::CleanUpTextures() // keep the 25 textures above and below the base index for (int i = 0; i < m_iBaseIndex - 25; i++) - { m_romList[i]->GetTexture().Destroy(); - } for (int i = m_iBaseIndex + 25; i < GetRomListSize(); i++) - { m_romList[i]->GetTexture().Destroy(); - } } void RomList::DestroyAllTextures() @@ -205,9 +179,7 @@ void RomList::Destroy() vector::iterator i; for (i = m_romList.begin(); i != m_romList.end(); i++) - { delete *i; - } m_romList.clear(); } diff --git a/xbox1/RetroLaunch/RomList.h b/xbox1/RetroLaunch/RomList.h index a2bf9562c2..d7c0171256 100644 --- a/xbox1/RetroLaunch/RomList.h +++ b/xbox1/RetroLaunch/RomList.h @@ -24,8 +24,8 @@ public: RomList(void); ~RomList(void); - void Load(); void Refresh(); + void Build(); bool IsLoaded(); @@ -38,7 +38,6 @@ public: int GetRomListSize(); Rom *GetRomAt(int index); - int FindRom(Rom *rom, int mode); void CleanUpTextures(); void DestroyAllTextures(); @@ -48,7 +47,6 @@ public: vector m_romList; private: - void Build(); void Destroy(); private: diff --git a/xbox1/RetroLaunch/Surface.cpp b/xbox1/RetroLaunch/Surface.cpp index e389a45526..87ffb917e9 100644 --- a/xbox1/RetroLaunch/Surface.cpp +++ b/xbox1/RetroLaunch/Surface.cpp @@ -33,25 +33,19 @@ CSurface::CSurface() m_y = 0; } -CSurface::CSurface(const string &szFilename) -{ - CSurface(); - Create(szFilename); -} - CSurface::~CSurface() { Destroy(); } -bool CSurface::Create(const string &szFilename) +bool CSurface::Create(const char *szFilename) { xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data; if (m_bLoaded) Destroy(); HRESULT g_hResult = D3DXCreateTextureFromFileExA(d3d->d3d_render_device, // d3d device - ("D:\\" + szFilename).c_str(), // filename + szFilename, // filename D3DX_DEFAULT, D3DX_DEFAULT, // width/height D3DX_DEFAULT, // mipmaps 0, // usage diff --git a/xbox1/RetroLaunch/Surface.h b/xbox1/RetroLaunch/Surface.h index c8df7a06fc..13766af62f 100644 --- a/xbox1/RetroLaunch/Surface.h +++ b/xbox1/RetroLaunch/Surface.h @@ -23,13 +23,12 @@ class CSurface { public: CSurface(); - CSurface(const string &szFilename); ~CSurface(); /** * Do functions */ - bool Create(const string &szFilename); + bool Create(const char *szFilename); bool Create(dword width, dword height); void Destroy(); diff --git a/xbox1/frontend/menu.cpp b/xbox1/frontend/menu.cpp index 8cf2ed99be..41c9f49a1d 100644 --- a/xbox1/frontend/menu.cpp +++ b/xbox1/frontend/menu.cpp @@ -36,7 +36,7 @@ int menu_init(void) // Load the rom list if it isn't already loaded if (!g_romList.IsLoaded()) - g_romList.Load(); + g_romList.Build(); // Load the font here g_font.Create();