avm2: Report OS as Windows instead of Linux for now (#14985)

This commit is contained in:
Fancy2209 2024-01-28 21:10:54 -01:00 committed by GitHub
parent 5b685d411f
commit f2880975ba
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -3,7 +3,7 @@ package flash.system {
public final class Capabilities {
public static function get os(): String {
stub_getter("flash.system.Capabilities", "os");
return "Linux 5.10.49"
return "Windows 8"
}
public native static function get playerType(): String;
@ -20,7 +20,7 @@ package flash.system {
public static function get manufacturer(): String {
stub_getter("flash.system.Capabilities", "manufacturer");
return "Adobe Linux"
return "Adobe Windows"
}
public static function get language(): String {
stub_getter("flash.system.Capabilities", "language");

View File

@ -9,10 +9,10 @@ pub fn get_version<'gc>(
_this: Object<'gc>,
_args: &[Value<'gc>],
) -> Result<Value<'gc>, Error<'gc>> {
// TODO: Report the correct OS instead of always reporting Linux
// TODO: Report the correct OS instead of always reporting Windows
Ok(AvmString::new_utf8(
activation.context.gc_context,
format!("LNX {},0,0,0", activation.avm2().player_version),
format!("WIN {},0,0,0", activation.avm2().player_version),
)
.into())
}