Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ var opts struct {
Profile string `short:"p" long:"profile" description:"Write profile to given file path"`

// FPS
FPS int `long:"fps" description:"required FPS, must be somewhere between 1 and 60" default:"25"`
FPS int `long:"fps" description:"required FPS, must be somewhere between 1 and 60" default:"60"`
}

// array with half width kanas as Go runes
Expand Down Expand Up @@ -120,7 +120,6 @@ func main() {
}
}
// Use a println for fun..
fmt.Println("Opening connection to The Matrix.. Please stand by..")
// setup logging with logfile /dev/null or ~/.gomatrix-log
filename := os.DevNull
if opts.Logging {
Expand Down Expand Up @@ -159,9 +158,9 @@ func main() {
os.Exit(1)
}
screen.HideCursor()
screen.SetStyle(tcell.StyleDefault.
Background(tcell.ColorBlack).
Foreground(tcell.ColorBlack))
// screen.SetStyle(tcell.StyleDefault.
// Background(tcell.ColorLightSalmon).
// Foreground(tcell.ColorBlack))
screen.Clear()

// StreamDisplay manager
Expand Down Expand Up @@ -223,7 +222,7 @@ func main() {
// flusher flushes the termbox every x milliseconds
curFPS := opts.FPS
fpsSleepTime := time.Duration(1000000/curFPS) * time.Microsecond
fmt.Printf("fps sleep time: %s\n", fpsSleepTime.String())
// fmt.Printf("fps sleep time: %s\n", fpsSleepTime.String())
go func() {
for {
time.Sleep(fpsSleepTime)
Expand Down Expand Up @@ -311,9 +310,6 @@ EVENTS:
// close down
screen.Fini()

log.Println("stopping gomatrix")
fmt.Println("Thank you for connecting with Morpheus' Matrix API v4.2. Have a nice day!")

// stop profiling (if required)
if len(opts.Profile) > 0 {
pprof.StopCPUProfile()
Expand Down
6 changes: 3 additions & 3 deletions stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ type Stream struct {
}

func (s *Stream) run() {
blackStyle := tcell.StyleDefault.
Foreground(tcell.ColorBlack).
Background(tcell.ColorBlack)
blackStyle := tcell.StyleDefault//.
// Foreground(tcell.ColorBlack).
// Background(tcell.ColorBlack)

midStyleA := blackStyle.Foreground(tcell.ColorGreen)
midStyleB := blackStyle.Foreground(tcell.ColorLime)
Expand Down