build(android): support android platform (config and logging) (#3741)
This commit is contained in:
parent
35f0b30845
commit
4478fd2a14
2 changed files with 64 additions and 3 deletions
|
|
@ -32,7 +32,7 @@
|
|||
#include <shellapi.h>
|
||||
#endif
|
||||
|
||||
#ifndef __APPLE__
|
||||
#if !defined(__ANDROID__) && !defined(__APPLE__)
|
||||
// For NVENC legacy constants
|
||||
#include <ffnvcodec/nvEncodeAPI.h>
|
||||
#endif
|
||||
|
|
@ -1038,9 +1038,12 @@ namespace config {
|
|||
}
|
||||
|
||||
void apply_config(std::unordered_map<std::string, std::string> &&vars) {
|
||||
#ifndef __ANDROID__
|
||||
// TODO: Android can possibly support this
|
||||
if (!fs::exists(stream.file_apps.c_str())) {
|
||||
fs::copy_file(SUNSHINE_ASSETS_DIR "/apps.json", stream.file_apps);
|
||||
}
|
||||
#endif
|
||||
|
||||
for (auto &[name, val] : vars) {
|
||||
BOOST_LOG(info) << "config: '"sv << name << "' = "sv << val;
|
||||
|
|
@ -1066,7 +1069,7 @@ namespace config {
|
|||
bool_f(vars, "nvenc_opengl_vulkan_on_dxgi", video.nv_opengl_vulkan_on_dxgi);
|
||||
bool_f(vars, "nvenc_latency_over_power", video.nv_sunshine_high_power_mode);
|
||||
|
||||
#ifndef __APPLE__
|
||||
#if !defined(__ANDROID__) && !defined(__APPLE__)
|
||||
video.nv_legacy.preset = video.nv.quality_preset + 11;
|
||||
video.nv_legacy.multipass = video.nv.two_pass == nvenc::nvenc_two_pass::quarter_resolution ? NV_ENC_TWO_PASS_QUARTER_RESOLUTION :
|
||||
video.nv.two_pass == nvenc::nvenc_two_pass::full_resolution ? NV_ENC_TWO_PASS_FULL_RESOLUTION :
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue