Copy system info to clipboard + Update bug_report.yml

plus minor static-related fixes
* linuxbsd: get_systemd_os_release_info_value() -> static breaks usage if used multiple times
* windows/linuxbsd: get_video_adapter_driver_info() writes info into static
* linuxbsd: get_distribution_name() + get_version() -> write bsd fallback into static variable
* windows/uwp/android: remove unnecessary use of static
This commit is contained in:
MJacred
2023-05-27 18:21:23 +02:00
parent 809a982162
commit 9e5bf3d589
7 changed files with 141 additions and 35 deletions

View File

@@ -182,7 +182,7 @@ String OS_Android::get_name() const {
}
String OS_Android::get_system_property(const char *key) const {
static String value;
String value;
char value_str[PROP_VALUE_MAX];
if (__system_property_get(key, value_str)) {
value = String(value_str);
@@ -230,20 +230,20 @@ String OS_Android::get_version() const {
"ro.potato.version", "ro.xtended.version", "org.evolution.version", "ro.corvus.version", "ro.pa.version",
"ro.crdroid.version", "ro.syberia.version", "ro.arrow.version", "ro.lineage.version" };
for (int i = 0; i < roms.size(); i++) {
static String rom_version = get_system_property(roms[i]);
String rom_version = get_system_property(roms[i]);
if (!rom_version.is_empty()) {
return rom_version;
}
}
static String mod_version = get_system_property("ro.modversion"); // Handles other Android custom ROMs.
String mod_version = get_system_property("ro.modversion"); // Handles other Android custom ROMs.
if (!mod_version.is_empty()) {
return mod_version;
}
// Handles stock Android.
static String sdk_version = get_system_property("ro.build.version.sdk_int");
static String build = get_system_property("ro.build.version.incremental");
String sdk_version = get_system_property("ro.build.version.sdk_int");
String build = get_system_property("ro.build.version.incremental");
if (!sdk_version.is_empty()) {
if (!build.is_empty()) {
return vformat("%s.%s", sdk_version, build);