diff --git a/src/libsuperderpy.c b/src/libsuperderpy.c index 872599c..6e723f4 100644 --- a/src/libsuperderpy.c +++ b/src/libsuperderpy.c @@ -120,6 +120,9 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char* game->_priv.window_width = 0; game->_priv.window_height = 0; + game->_priv.bg = params.bg_color; + game->_priv.bg.a = 1.0; + game->_priv.mutex = al_create_mutex(); game->config.fullscreen = strtol(GetConfigOptionDefault(game, "SuperDerpy", "fullscreen", IS_POCKETCHIP ? "0" : "1"), NULL, 10); diff --git a/src/libsuperderpy.h b/src/libsuperderpy.h index 5bcd2cb..ae6994b 100644 --- a/src/libsuperderpy.h +++ b/src/libsuperderpy.h @@ -152,6 +152,7 @@ struct Params { int samples; /*!< How many samples should be used for multisampling; 0 to disable. */ int sample_rate; /*!< Default sample rate of audio output; 0 to use engine default. */ char* window_title; /*!< A title of the game's window. When NULL, al_get_app_name() is used. */ + ALLEGRO_COLOR bg_color; /*!< Default background color of the game window. Only opaque colors are supported. */ struct Handlers handlers; /*!< A list of user callbacks to register. */ };