google / android-emulator-webrtc

Apache License 2.0
121 stars 27 forks source link

How do you specify your own hardware config? #2

Closed GilbertNordhammar closed 3 years ago

GilbertNordhammar commented 3 years ago

I have an emulator that doesn't use 1920x1080p as its screen dimensions, which seems to be the default for this package. The following code in event_handler.js suggests that you should be able to specify your own dimensions (presumably via a config.ini file)

getScreenSize() {
      this.status.updateStatus(state => {
        this.setState({
          deviceWidth: parseInt(state.hardwareConfig["hw.lcd.width"]) || 1080,
          deviceHeight: parseInt(state.hardwareConfig["hw.lcd.height"]) || 1920
        });
      });
    }

However, I can't for the love of god figure out how to set the value of state.hardwareConfig. I also tried setting the height and view props of <Emulator />, but that didn't seem to do anything?