mirror of
https://github.com/JetSetIlly/Gopher2600.git
synced 2024-06-02 20:18:20 -04:00
preview emulation uses TV spec from command line option
this fixes a problem where some ROMs when given the command line directive to use the PAL spec is contradicted by the preview emulation. this seems to be a particular problem with PAL ROMs that never set a valid VSYNC signal. Nightstalker is a good example of such a ROM
This commit is contained in:
parent
f9cdb366dd
commit
1c95bc94b8
|
@ -374,7 +374,7 @@ func NewDebugger(opts CommandLineOptions, create CreateUserInterface) (*Debugger
|
|||
}
|
||||
|
||||
// create preview emulation
|
||||
dbg.preview, err = preview.NewEmulation(dbg.vcs.Env.Prefs)
|
||||
dbg.preview, err = preview.NewEmulation(dbg.vcs.Env.Prefs, opts.Spec)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("debugger: %w", err)
|
||||
}
|
||||
|
|
|
@ -57,6 +57,11 @@ import (
|
|||
// * bottom of screen needs careful consideration
|
||||
// - Ladybug
|
||||
// - Man Goes Down
|
||||
//
|
||||
// finally, the following conditions are worth documenting as being important:
|
||||
//
|
||||
// * PAL ROMs without VSYNC cannot be sized or changed to the correct spec automatically
|
||||
// - Nightstalker
|
||||
type resizer struct {
|
||||
// candidate top/bottom values for an actual resize.
|
||||
//
|
||||
|
|
|
@ -34,11 +34,11 @@ type Emulation struct {
|
|||
const previewLabel = environment.Label("preview")
|
||||
|
||||
// NewEmulation is the preferred method of initialisation for the Emulation type
|
||||
func NewEmulation(prefs *preferences.Preferences) (*Emulation, error) {
|
||||
func NewEmulation(prefs *preferences.Preferences, spec string) (*Emulation, error) {
|
||||
em := &Emulation{}
|
||||
|
||||
// the VCS and not referred to directly again
|
||||
tv, err := television.NewTelevision("AUTO")
|
||||
tv, err := television.NewTelevision(spec)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("preview: %w", err)
|
||||
}
|
||||
|
|
|
@ -101,7 +101,7 @@ func NewAnim(prefs *preferences.Preferences) (*Anim, error) {
|
|||
thmb.Reset()
|
||||
|
||||
// create preview emulation
|
||||
thmb.preview, err = preview.NewEmulation(thmb.vcs.Env.Prefs)
|
||||
thmb.preview, err = preview.NewEmulation(thmb.vcs.Env.Prefs, "AUTO")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("thumbnailer: %w", err)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue