mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-06-12 11:12:18 +00:00
Trace iOS black screen startup
This commit is contained in:
parent
f462e2fecd
commit
aa40213e1e
4 changed files with 53 additions and 2 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include <gpu/video.h>
|
||||
#include <install/installer.h>
|
||||
#include <kernel/function.h>
|
||||
#include <os/logger.h>
|
||||
#include <os/process.h>
|
||||
#include <patches/audio_patches.h>
|
||||
#include <patches/inspire_patches.h>
|
||||
|
|
@ -36,6 +37,10 @@ PPC_FUNC(sub_824EB490)
|
|||
App::s_isMissingDLC = !Installer::checkAllDLC(GetGamePath());
|
||||
App::s_language = Config::Language;
|
||||
|
||||
#ifdef UNLEASHED_RECOMP_IOS
|
||||
LOGFN("SWA::CApplication constructed. missingDLC={}", App::s_isMissingDLC);
|
||||
#endif
|
||||
|
||||
SWA::SGlobals::Init();
|
||||
Registry::Save();
|
||||
|
||||
|
|
@ -48,6 +53,15 @@ static std::thread::id g_mainThreadId = std::this_thread::get_id();
|
|||
PPC_FUNC_IMPL(__imp__sub_822C1130);
|
||||
PPC_FUNC(sub_822C1130)
|
||||
{
|
||||
#ifdef UNLEASHED_RECOMP_IOS
|
||||
static uint32_t s_updateCount = 0;
|
||||
if (s_updateCount < 5 || (s_updateCount % 300) == 0)
|
||||
{
|
||||
LOGFN("SWA::CApplication::Update count={} delta={}", s_updateCount, ctx.f1.f64);
|
||||
}
|
||||
s_updateCount++;
|
||||
#endif
|
||||
|
||||
Video::WaitOnSwapChain();
|
||||
|
||||
// Correct small delta time errors.
|
||||
|
|
@ -94,4 +108,3 @@ PPC_FUNC(sub_822C1130)
|
|||
|
||||
__imp__sub_822C1130(ctx, base);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include <user/config.h>
|
||||
#include <sdl_listener.h>
|
||||
#include <xxHashMap.h>
|
||||
#include <os/logger.h>
|
||||
#include <os/process.h>
|
||||
|
||||
#if defined(ASYNC_PSO_DEBUG) || defined(PSO_CACHING)
|
||||
|
|
@ -1969,6 +1970,19 @@ bool Video::CreateHostDevice(const char *sdlVideoDriver, bool graphicsApiRetry)
|
|||
g_swapChain->setVsyncEnabled(Config::VSync);
|
||||
g_swapChainValid = !g_swapChain->needsResize();
|
||||
|
||||
#ifdef UNLEASHED_RECOMP_IOS
|
||||
LOGFN("Created iOS swapchain: buffers={} maxFrameLatency={} valid={} size={}x{} viewport={}x{} window={}x{}",
|
||||
bufferCount,
|
||||
Config::MaxFrameLatency.Value,
|
||||
g_swapChainValid,
|
||||
g_swapChain->getWidth(),
|
||||
g_swapChain->getHeight(),
|
||||
Video::s_viewportWidth,
|
||||
Video::s_viewportHeight,
|
||||
GameWindow::s_width,
|
||||
GameWindow::s_height);
|
||||
#endif
|
||||
|
||||
for (auto& acquireSemaphore : g_acquireSemaphores)
|
||||
acquireSemaphore = g_device->createCommandSemaphore();
|
||||
|
||||
|
|
@ -2184,6 +2198,10 @@ void Video::WaitForGPU()
|
|||
|
||||
static uint32_t CreateDevice(uint32_t a1, uint32_t a2, uint32_t a3, uint32_t a4, uint32_t a5, be<uint32_t>* a6)
|
||||
{
|
||||
#ifdef UNLEASHED_RECOMP_IOS
|
||||
LOGFN("Guest CreateDevice called: a1=0x{:08X} a2=0x{:08X} a3=0x{:08X} a4=0x{:08X} a5=0x{:08X}", a1, a2, a3, a4, a5);
|
||||
#endif
|
||||
|
||||
g_xdbfTextureCache = std::unordered_map<uint16_t, GuestTexture *>();
|
||||
|
||||
for (auto &achievement : g_xdbfWrapper.GetAchievements(XDBF_LANGUAGE_ENGLISH))
|
||||
|
|
@ -2233,6 +2251,10 @@ static uint32_t CreateDevice(uint32_t a1, uint32_t a2, uint32_t a3, uint32_t a4,
|
|||
|
||||
*a6 = g_memory.MapVirtual(device);
|
||||
|
||||
#ifdef UNLEASHED_RECOMP_IOS
|
||||
LOGFN("Guest CreateDevice finished: device=0x{:08X}", uint32_t(*a6));
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -2873,6 +2895,15 @@ static std::atomic<bool> g_executedCommandList;
|
|||
|
||||
void Video::Present()
|
||||
{
|
||||
#ifdef UNLEASHED_RECOMP_IOS
|
||||
static uint32_t s_presentCount = 0;
|
||||
if (s_presentCount < 5 || (s_presentCount % 300) == 0)
|
||||
{
|
||||
LOGFN("Video::Present count={} swapChainValid={}", s_presentCount, g_swapChainValid);
|
||||
}
|
||||
s_presentCount++;
|
||||
#endif
|
||||
|
||||
g_readyForCommands = false;
|
||||
|
||||
RenderCommand cmd;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
VERSION_MILESTONE=""
|
||||
VERSION_MAJOR=1
|
||||
VERSION_MINOR=0
|
||||
VERSION_REVISION=4
|
||||
VERSION_REVISION=5
|
||||
|
|
|
|||
|
|
@ -193,6 +193,13 @@ void GameWindow::Init(const char* sdlVideoDriver)
|
|||
s_width = Config::WindowWidth;
|
||||
s_height = Config::WindowHeight;
|
||||
|
||||
#ifdef UNLEASHED_RECOMP_IOS
|
||||
s_x = SDL_WINDOWPOS_UNDEFINED;
|
||||
s_y = SDL_WINDOWPOS_UNDEFINED;
|
||||
s_width = 1280;
|
||||
s_height = 720;
|
||||
#endif
|
||||
|
||||
if (s_x == -1 && s_y == -1)
|
||||
s_x = s_y = SDL_WINDOWPOS_CENTERED;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue