Skip to content
Snippets Groups Projects
Commit 4d2fbc68 authored by deuce's avatar deuce
Browse files

Use js.global.CTerm_Version for persistant variable storage... not sure why

this is necessary, but it is apparently.

Allow loadfont.js to take an array of filenames as an argument.
parent e3ab4c85
No related branches found
No related tags found
No related merge requests found
...@@ -8,8 +8,9 @@ ...@@ -8,8 +8,9 @@
*/ */
load("sbbsdefs.js"); load("sbbsdefs.js");
if(this.CTerm_Version==undefined)
js.global.CTerm_Version=null;
loadfont(); loadfont();
var CTerm_Version;
function loadfont() function loadfont()
{ {
...@@ -34,7 +35,10 @@ function loadfont() ...@@ -34,7 +35,10 @@ function loadfont()
} }
} }
else { else {
filenames.push(argv[i].toString()); if(argv[i].constructor==Array)
filenames=filenames.concat(argv[i]);
else
filenames.push(argv[i].toString());
} }
} }
...@@ -67,7 +71,7 @@ function loadfont() ...@@ -67,7 +71,7 @@ function loadfont()
// Check if it's CTerm and supports font loading... // Check if it's CTerm and supports font loading...
var ver=new Array(0,0); var ver=new Array(0,0);
if(CTerm_Version == undefined) { if(CTerm_Version == undefined || CTerm_Version == null) {
// Disable parsed input... we need to do ESC processing ourselves here. // Disable parsed input... we need to do ESC processing ourselves here.
var oldctrl=console.ctrlkey_passthru; var oldctrl=console.ctrlkey_passthru;
console.ctrlkey_passthru=-1; console.ctrlkey_passthru=-1;
......
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
// Pass the desired fotn slot on the command line // Pass the desired fotn slot on the command line
// If nothing passed, changes to font 0 (CP437) // If nothing passed, changes to font 0 (CP437)
if(this.CTerm_Version==undefined)
js.global.CTerm_Version=null;
pickfont(); pickfont();
var CTerm_Version;
function pickfont() function pickfont()
{ {
...@@ -21,7 +22,7 @@ function pickfont() ...@@ -21,7 +22,7 @@ function pickfont()
// Check if it's CTerm and supports font loading... // Check if it's CTerm and supports font loading...
var ver=new Array(0,0); var ver=new Array(0,0);
if(CTerm_Version==undefined) { if(CTerm_Version==undefined || CTerm_Version==null) {
if(detect) { if(detect) {
// Disable parsed input... we need to do ESC processing ourselves here. // Disable parsed input... we need to do ESC processing ourselves here.
var oldctrl=console.ctrlkey_passthru; var oldctrl=console.ctrlkey_passthru;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment