mirror of
https://github.com/giongto35/cloud-game.git
synced 2026-07-20 16:54:25 +00:00
* Allow HTTP access to Raspberry Pi over local network Lower audio buffer maximum theoretical size to get the worker code to compile on Raspberry Pi * Add https port flag to run https worker and coordinator on the same machine Add https chain and key flags to allow to use an existing certificate and bypass letsencrypt Note the ping address resolution is still broken with this configuration * Add option to define a ping server in the coordinator This is useful when it is not predicatable what address and port the worker will be runnning at This only works when there is a single worker * Free temporarily allocated CStrings Store constant CString * Only load core once and unload it when done * Add Nintendo 64 support! Disclaimer: only tested with Mupen64plus and Mupen64plusNext on Raspberry Pi. It probably needs more work to run on every system and with other OpenGL libretro libraries. Input controls are hacked together, it really needs analog stick and remapping support to play in a nicer way. I am worried there might be a memory leak when unloading Mupen64plus but this needs further investigation. * Add analog sticks + R2,L2,R3,L3 support * Add client logic to control left analog stick via keyboard and touch Add client logic to toggle between dpad mode and analog mode (even for joystick) Might need to revisit if and when remapping is implemented Tocuh sensitivity of analog stick is pretty high, might need tweaking * Add cores for Raspberry Pi Add N64 core for linux x86_64 * Reset use OpenGL flag on nanoarch shutdown (line lost in refactoring)
45 lines
1.6 KiB
Go
45 lines
1.6 KiB
Go
package coordinator
|
|
|
|
import (
|
|
"github.com/giongto35/cloud-game/pkg/monitoring"
|
|
"github.com/spf13/pflag"
|
|
)
|
|
|
|
type Config struct {
|
|
Port int
|
|
PublicDomain string
|
|
PingServer string
|
|
URLPrefix string
|
|
DebugHost string
|
|
|
|
MonitoringConfig monitoring.ServerMonitoringConfig
|
|
}
|
|
|
|
func NewDefaultConfig() Config {
|
|
return Config{
|
|
Port: 8800,
|
|
PublicDomain: "http://localhost:8000",
|
|
PingServer: "",
|
|
|
|
MonitoringConfig: monitoring.ServerMonitoringConfig{
|
|
Port: 6601,
|
|
URLPrefix: "/coordinator",
|
|
MetricEnabled: false,
|
|
ProfilingEnabled: false,
|
|
},
|
|
}
|
|
}
|
|
|
|
func (c *Config) AddFlags(fs *pflag.FlagSet) *Config {
|
|
fs.IntVarP(&c.Port, "port", "", 8800, "Coordinator server port")
|
|
|
|
fs.BoolVarP(&c.MonitoringConfig.MetricEnabled, "monitoring.metric", "m", c.MonitoringConfig.MetricEnabled, "Enable prometheus metric for server")
|
|
fs.BoolVarP(&c.MonitoringConfig.ProfilingEnabled, "monitoring.pprof", "p", c.MonitoringConfig.ProfilingEnabled, "Enable golang pprof for server")
|
|
fs.IntVarP(&c.MonitoringConfig.Port, "monitoring.port", "", c.MonitoringConfig.Port, "Monitoring server port")
|
|
fs.StringVarP(&c.MonitoringConfig.URLPrefix, "monitoring.prefix", "", c.MonitoringConfig.URLPrefix, "Monitoring server url prefix")
|
|
fs.StringVarP(&c.DebugHost, "debughost", "d", "", "Specify the server want to connect directly to debug")
|
|
fs.StringVarP(&c.PublicDomain, "domain", "n", c.PublicDomain, "Specify the public domain of the coordinator")
|
|
fs.StringVarP(&c.PingServer, "pingServer", "", c.PingServer, "Specify the worker address that the client can ping (with protocol and port)")
|
|
|
|
return c
|
|
}
|