summaryrefslogtreecommitdiffhomepage
path: root/ext
diff options
context:
space:
mode:
authorAndrew Havens <[email protected]>2017-12-28 20:54:33 -0800
committerTom Black <[email protected]>2018-01-02 20:40:04 -0800
commit76795cd21ca2f475f948456971e8ead4dad868e7 (patch)
tree81ee22741996b4273d2cb05d18d9c9d2bff30285 /ext
parent50b36b6a8aaf9512a4699734c160fcd82c0c2ea6 (diff)
downloadruby2d-76795cd21ca2f475f948456971e8ead4dad868e7.tar.gz
ruby2d-76795cd21ca2f475f948456971e8ead4dad868e7.zip
Autoload controller mappings file.
Diffstat (limited to 'ext')
-rw-r--r--ext/ruby2d/ruby2d.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/ruby2d/ruby2d.c b/ext/ruby2d/ruby2d.c
index 1b1bb5e..49beb2c 100644
--- a/ext/ruby2d/ruby2d.c
+++ b/ext/ruby2d/ruby2d.c
@@ -909,6 +909,9 @@ static R_VAL ruby2d_window_ext_show(R_VAL self) {
S2D_Diagnostics(true);
}
+ char *controller_mappings_path = RSTRING_PTR(r_iv_get(self, "@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"));