From 07384804391770496a301c84349c2915b4ef32c5 Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 2 Dec 2011 02:48:04 +0100 Subject: [PATCH] Make sure set_defaults is called. --- dynamic.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/dynamic.c b/dynamic.c index 8f72bc2012..ce113f6832 100644 --- a/dynamic.c +++ b/dynamic.c @@ -102,6 +102,7 @@ void (*psnes_term)(void); #ifdef NEED_DYNAMIC static void set_environment(void); #endif +static void set_environment_defaults(void); #ifdef HAVE_DYNAMIC static void load_dynamic(void) @@ -218,6 +219,7 @@ void init_libsnes_sym(void) set_statics(); #endif + set_environment_defaults(); #ifdef NEED_DYNAMIC set_environment(); #endif @@ -323,18 +325,6 @@ static bool environment_cb(unsigned cmd, void *data) return true; } -// Assume SNES as defaults. -static void set_environment_defaults(void) -{ - g_extern.system.pitch = 0; // 0 is classic libsnes semantics. - g_extern.system.geom = (struct snes_geometry) { - .base_width = 256, - .base_height = 224, - .max_width = 512, - .max_height = 512, - }; -} - // SSNES extension hooks. Totally optional 'n shizz :) static void set_environment(void) { @@ -349,8 +339,18 @@ static void set_environment(void) if (psnes_set_environment) psnes_set_environment(environment_cb); - - set_environment_defaults(); } #endif +// Assume SNES as defaults. +static void set_environment_defaults(void) +{ + g_extern.system.pitch = 0; // 0 is classic libsnes semantics. + g_extern.system.geom = (struct snes_geometry) { + .base_width = 256, + .base_height = 224, + .max_width = 512, + .max_height = 512, + }; +} +