handle an unknown native resolution without errors, at least

This commit is contained in:
Daniel Brooks
2015-04-02 19:29:47 -07:00
parent 25b3e7b7d5
commit 0ec9153d06
+12 -6
View File
@@ -306,8 +306,8 @@ var Module = null;
function JSMESSLoader() {
var config = Array.prototype.reduce.call(arguments, extend);
config.emulator_arguments = build_mess_arguments(config.muted, config.mess_driver,
[config.nativeResolution.width, config.nativeResolution.height],
config.sample_rate, config.peripheral, config.extra_mess_args);
config.nativeResolution, config.sample_rate,
config.peripheral, config.extra_mess_args);
config.needs_jsmess_webaudio = true;
return config;
}
@@ -328,8 +328,8 @@ var Module = null;
function JSMAMELoader() {
var config = Array.prototype.reduce.call(arguments, extend);
config.emulator_arguments = build_mame_arguments(config.muted, config.mess_driver,
[config.nativeResolution.width, config.nativeResolution.height],
config.sample_rate, config.extra_mess_args);
config.nativeResolution, config.sample_rate,
config.extra_mess_args);
config.needs_jsmess_webaudio = true;
return config;
}
@@ -348,9 +348,12 @@ var Module = null;
'-verbose',
'-rompath', 'emulator',
'-window',
'-resolution', native_resolution.join('x'),
'-nokeepaspect'];
if (native_resolution && "width" in native_resolution && "height" in native_resolution) {
args.push('-resolution', [native_resolution.width, native_resolution.height].join('x'));
}
if (muted) {
args.push('-sound', 'none');
} else if (sample_rate) {
@@ -374,9 +377,12 @@ var Module = null;
'-verbose',
'-rompath', 'emulator',
'-window',
'-resolution', native_resolution.join('x'),
'-nokeepaspect'];
if (native_resolution && "width" in native_resolution && "height" in native_resolution) {
args.push('-resolution', [native_resolution.width, native_resolution.height].join('x'));
}
if (muted) {
args.push('-sound', 'none');
} else if (sample_rate) {