Add some extra logging

This commit is contained in:
Jesse Talavera 2024-05-30 14:31:19 -04:00
parent a0f35f37bb
commit d00fb33bd2
3 changed files with 5 additions and 1 deletions

View File

@ -139,6 +139,7 @@ void MelonDsDs::CoreState::Run() noexcept {
if (retro::is_variable_updated()) [[unlikely]] {
// If any settings have changed...
retro::debug("At least one setting has changed; updating now");
ParseConfig(Config);
ApplyConfig(Config);
UpdateConsole(Config, nds);
@ -414,6 +415,7 @@ void MelonDsDs::CoreState::StartConsole() {
retro_assert(Console != nullptr); // This function should only be called if the console is initialized
retro::debug(TracyFunction);
_renderState.UpdateRenderer(Config, *Console);
{
@ -652,6 +654,7 @@ void MelonDsDs::CoreState::ApplyConfig(const CoreConfig& config) noexcept {
// If this isn't the first time we're setting the renderer...
if (oldRenderer != newRenderer) {
// If we're switching renderer modes...
retro::debug("Switching render mode from {} to {}", *oldRenderer, *newRenderer);
retro_system_av_info av = GetSystemAvInfo(*newRenderer);
retro::set_system_av_info(av);
}

View File

@ -205,6 +205,7 @@ void MelonDsDs::OpenGLRenderState::ContextReset(melonDS::NDS& nds, const CoreCon
retro::debug(TracyFunction);
// Initialize all OpenGL function pointers
retro::debug("Initializing OpenGL function pointers");
glsm_ctl(GLSM_CTL_STATE_CONTEXT_RESET, nullptr);
TracyGpuContext; // Must be called AFTER the function pointers are bound!

View File

@ -110,7 +110,7 @@ void MelonDsDs::RenderStateWrapper::UpdateRenderer(const CoreConfig& config, mel
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
if (auto* glRender = dynamic_cast<OpenGLRenderState*>(_renderState.get()); glRender && !nds.GPU.GetRenderer3D().Accelerated) {
// If we're configured to use the OpenGL renderer, and we aren't already...
retro::debug("Initializing OpenGL renderer");
if (auto renderer = melonDS::GLRenderer::New()) {
nds.GPU.SetRenderer3D(std::move(renderer));
glRender->RequestRefresh();