mirror of
https://github.com/db48x/emularity.git
synced 2026-09-15 02:52:57 +00:00
handle an unknown native resolution without errors, at least
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user