ext/ruby2d/ruby2d.c in ruby2d-0.5.0 vs ext/ruby2d/ruby2d.c in ruby2d-0.5.1
- old
+ new
@@ -907,9 +907,15 @@
if (r_test(r_iv_get(self, "@diagnostics"))) {
S2D_Diagnostics(true);
}
+ // Load controller mappings, if DB file exists
+ char *controller_mappings_path = RSTRING_PTR(r_iv_get(self, "@controller_mappings_path"));
+ if (S2D_FileExists(controller_mappings_path)) {
+ S2D_LoadControllerMappingsFromFile(controller_mappings_path);
+ }
+
// Get window attributes
char *title = RSTRING_PTR(r_iv_get(self, "@title"));
int width = NUM2INT(r_iv_get(self, "@width"));
int height = NUM2INT(r_iv_get(self, "@height"));
int flags = 0;