From 199871955c38f381ad8b6fb03ce0ebf2393bbbe6 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 24 Jul 2012 12:04:26 +0200 Subject: [PATCH] (Xbox 1) Shows menu now --- xbox1/RetroLaunch/Surface.cpp | 8 ++++---- xbox1/frontend/menu.cpp | 32 ++++++++++++++++---------------- xbox1/xdk_d3d8.h | 1 + 3 files changed, 21 insertions(+), 20 deletions(-) diff --git a/xbox1/RetroLaunch/Surface.cpp b/xbox1/RetroLaunch/Surface.cpp index 0f6c1aa94d..aabebebfe0 100644 --- a/xbox1/RetroLaunch/Surface.cpp +++ b/xbox1/RetroLaunch/Surface.cpp @@ -172,10 +172,10 @@ bool CSurface::Render(int x, int y, dword w, dword h) /*CustomVertex*/DrawVerticeFormats newVerts[] = { // x, y, z, color, u ,v - {fX, fY, 0.0f, /*D3DCOLOR_ARGB(m_byOpacity, m_byR, m_byG, m_byB),*/ 0, 0}, - {fX + w, fY, 0.0f, /*D3DCOLOR_ARGB(m_byOpacity, m_byR, m_byG, m_byB),*/ 1, 0}, - {fX + w, fY + h, 0.0f, /*D3DCOLOR_ARGB(m_byOpacity, m_byR, m_byG, m_byB),*/ 1, 1}, - {fX, fY + h, 0.0f, /*D3DCOLOR_ARGB(m_byOpacity, m_byR, m_byG, m_byB),*/ 0, 1} + {fX, fY, 0.0f, /*D3DCOLOR_ARGB(m_byOpacity, m_byR, m_byG, m_byB),*/ 0, 0, 0}, + {fX + w, fY, 0.0f, /*D3DCOLOR_ARGB(m_byOpacity, m_byR, m_byG, m_byB),*/ 0, 1, 0}, + {fX + w, fY + h, 0.0f, /*D3DCOLOR_ARGB(m_byOpacity, m_byR, m_byG, m_byB),*/ 0, 1, 1}, + {fX, fY + h, 0.0f, /*D3DCOLOR_ARGB(m_byOpacity, m_byR, m_byG, m_byB),*/ 0, 0, 1} }; // load the existing vertices diff --git a/xbox1/frontend/menu.cpp b/xbox1/frontend/menu.cpp index c9764d5fe0..16ea97b817 100644 --- a/xbox1/frontend/menu.cpp +++ b/xbox1/frontend/menu.cpp @@ -67,23 +67,23 @@ void menu_free(void) {} void menu_loop(void) { xdk_d3d_video_t *d3d = (xdk_d3d_video_t*)driver.video_data; - rarch_console_load_game("D:\\ssf2x.gba"); + //rarch_console_load_game("D:\\ssf2x.gba"); // Loop the app - //while (!g_bExit) - //{ - // d3d->d3d_render_device->Clear(0, NULL, D3DCLEAR_TARGET, - // D3DCOLOR_XRGB(0, 0, 0), - // 1.0f, 0); - // - // d3d->d3d_render_device->BeginScene(); - // d3d->d3d_render_device->SetFlickerFilter(g_iniFile.m_currentIniEntry.dwFlickerFilter); - // d3d->d3d_render_device->SetSoftDisplayFilter(g_iniFile.m_currentIniEntry.bSoftDisplayFilter); + while (!g_bExit) + { + d3d->d3d_render_device->Clear(0, NULL, D3DCLEAR_TARGET, + D3DCOLOR_XRGB(0, 0, 0), + 1.0f, 0); + + d3d->d3d_render_device->BeginScene(); + d3d->d3d_render_device->SetFlickerFilter(g_iniFile.m_currentIniEntry.dwFlickerFilter); + d3d->d3d_render_device->SetSoftDisplayFilter(g_iniFile.m_currentIniEntry.bSoftDisplayFilter); - // //g_input.GetInput(); - // g_menuManager.Update(); - // - // d3d->d3d_render_device->EndScene(); - // d3d->d3d_render_device->Present(NULL, NULL, NULL, NULL); - //} + //g_input.GetInput(); + g_menuManager.Update(); + + d3d->d3d_render_device->EndScene(); + d3d->d3d_render_device->Present(NULL, NULL, NULL, NULL); + } } diff --git a/xbox1/xdk_d3d8.h b/xbox1/xdk_d3d8.h index 402a2eb4af..7ce1a84c84 100644 --- a/xbox1/xdk_d3d8.h +++ b/xbox1/xdk_d3d8.h @@ -43,6 +43,7 @@ typedef struct typedef struct DrawVerticeFormats { float x, y, z; + float rhw; float u, v; } DrawVerticeFormats;