From 33603aebe63c0ad170a3b5d033b839969b28cbcf Mon Sep 17 00:00:00 2001 From: "P. F. Chimento" Date: Sun, 30 Jan 2011 17:40:26 +0100 Subject: [PATCH] Added calls to set the preferred interpreter The preferred interpreter can now be set in player/main.c by simply changing one of the calls to chimara_if_set_preferred_interpreter(). --- player/main.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/player/main.c b/player/main.c index 7eef7f7..9bfcb6f 100644 --- a/player/main.c +++ b/player/main.c @@ -176,7 +176,10 @@ create_window(void) } glk = chimara_if_new(); - g_object_set(glk, "ignore-errors", TRUE, NULL); + g_object_set(glk, + "ignore-errors", TRUE, + /*"interpreter-number", CHIMARA_IF_ZMACHINE_TANDY_COLOR,*/ + NULL); if( !chimara_glk_set_css_from_file(CHIMARA_GLK(glk), PACKAGE_DATA_DIR "/style.css", &error) ) { #ifdef DEBUG g_error_free(error); @@ -189,6 +192,24 @@ create_window(void) } #endif /* DEBUG */ } + chimara_if_set_preferred_interpreter(CHIMARA_IF(glk), + CHIMARA_IF_FORMAT_Z5, + CHIMARA_IF_INTERPRETER_FROTZ); + chimara_if_set_preferred_interpreter(CHIMARA_IF(glk), + CHIMARA_IF_FORMAT_Z6, + CHIMARA_IF_INTERPRETER_NITFOL); + chimara_if_set_preferred_interpreter(CHIMARA_IF(glk), + CHIMARA_IF_FORMAT_Z8, + CHIMARA_IF_INTERPRETER_FROTZ); + chimara_if_set_preferred_interpreter(CHIMARA_IF(glk), + CHIMARA_IF_FORMAT_Z_BLORB, + CHIMARA_IF_INTERPRETER_FROTZ); + chimara_if_set_preferred_interpreter(CHIMARA_IF(glk), + CHIMARA_IF_FORMAT_GLULX, + CHIMARA_IF_INTERPRETER_GLULXE); + chimara_if_set_preferred_interpreter(CHIMARA_IF(glk), + CHIMARA_IF_FORMAT_GLULX_BLORB, + CHIMARA_IF_INTERPRETER_GLULXE); /* DON'T UNCOMMENT THIS your eyes will burn but it is a good test of programmatically altering just one style -- 2.30.2