mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-08-02 14:52:26 +00:00
Remove emu mock leftovers
This commit is contained in:
parent
b31d8a7029
commit
af98bddb14
2 changed files with 3 additions and 16 deletions
|
|
@ -3,7 +3,6 @@ package nanoarch
|
|||
import (
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
"image"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
|
|
@ -29,8 +28,6 @@ type EmulatorMock struct {
|
|||
|
||||
// Libretro compiled lib core name
|
||||
core string
|
||||
// draw canvas instance
|
||||
canvas *image.RGBA
|
||||
// shared core paths (can't be changed)
|
||||
paths EmulatorPaths
|
||||
|
||||
|
|
@ -93,8 +90,7 @@ func GetEmulatorMock(room string, system string) *EmulatorMock {
|
|||
done: make(chan struct{}, 1),
|
||||
},
|
||||
|
||||
canvas: image.NewRGBA(image.Rect(0, 0, meta.Width, meta.Height)),
|
||||
core: path.Base(meta.Lib),
|
||||
core: path.Base(meta.Lib),
|
||||
|
||||
paths: EmulatorPaths{
|
||||
assets: cleanPath(rootPath),
|
||||
|
|
@ -109,7 +105,7 @@ func GetEmulatorMock(room string, system string) *EmulatorMock {
|
|||
|
||||
// stub globals
|
||||
NAEmulator = &emu.naEmulator
|
||||
outputImg = emu.canvas
|
||||
//outputImg = emu.canvas
|
||||
|
||||
emu.paths.save = cleanPath(emu.GetHashPath())
|
||||
|
||||
|
|
@ -134,11 +130,6 @@ func (emu *EmulatorMock) loadRom(game string) {
|
|||
fmt.Printf("%v %v\n", emu.paths.cores, emu.core)
|
||||
coreLoad(emulator.Metadata{LibPath: emu.paths.cores + emu.core})
|
||||
coreLoadGame(emu.paths.games + game)
|
||||
|
||||
if emu.canvas.Rect.Dx() == 0 || emu.canvas.Rect.Dy() == 0 {
|
||||
emu.canvas = image.NewRGBA(image.Rect(0, 0, emu.meta.BaseWidth, emu.meta.BaseHeight))
|
||||
outputImg = emu.canvas
|
||||
}
|
||||
}
|
||||
|
||||
// shutdownEmulator closes the emulator and cleans its resources.
|
||||
|
|
|
|||
|
|
@ -157,11 +157,7 @@ func TestStateConcurrency(t *testing.T) {
|
|||
op := 0
|
||||
|
||||
mock.loadRom(test.run.rom)
|
||||
go mock.handleVideo(func(frame GameFrame) {
|
||||
if len(frame.Data.Pix) == 0 {
|
||||
t.Errorf("It seems that rom video frame was empty, which is strange!")
|
||||
}
|
||||
})
|
||||
go mock.handleVideo(func(frame GameFrame) {})
|
||||
go mock.handleAudio(func(_ []int16) {})
|
||||
go mock.handleInput(func(_ InputEvent) {})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue