[*] basic in-house cpp linting (#4039)

- add `#pragma once` to remainder files
- "correcter" defines (ANDROID), see https://groups.google.com/g/android-ndk/c/cf9_f1SLXls
- extra miscelly fixups

Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4039
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
lizzie 2026-06-04 05:49:07 +02:00 committed by crueter
parent 978d9d935d
commit 89199f4d27
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
53 changed files with 176 additions and 153 deletions

View file

@ -30,7 +30,7 @@
#include "input_common/drivers/sdl_driver.h"
#endif
#ifdef ANDROID
#ifdef __ANDROID__
#include "input_common/drivers/android.h"
#endif
@ -85,7 +85,7 @@ struct InputSubsystem::Impl {
RegisterEngine("cemuhookudp", udp_client);
RegisterEngine("tas", tas_input);
RegisterEngine("camera", camera);
#ifdef ANDROID
#ifdef __ANDROID__
RegisterEngine("android", android);
#endif
RegisterEngine("virtual_amiibo", virtual_amiibo);
@ -119,7 +119,7 @@ struct InputSubsystem::Impl {
UnregisterEngine(udp_client);
UnregisterEngine(tas_input);
UnregisterEngine(camera);
#ifdef ANDROID
#ifdef __ANDROID__
UnregisterEngine(android);
#endif
UnregisterEngine(virtual_amiibo);
@ -138,13 +138,13 @@ struct InputSubsystem::Impl {
Common::ParamPackage{{"display", "Any"}, {"engine", "any"}},
};
#ifndef ANDROID
#ifndef __ANDROID__
auto keyboard_devices = keyboard->GetInputDevices();
devices.insert(devices.end(), keyboard_devices.begin(), keyboard_devices.end());
auto mouse_devices = mouse->GetInputDevices();
devices.insert(devices.end(), mouse_devices.begin(), mouse_devices.end());
#endif
#ifdef ANDROID
#ifdef __ANDROID__
auto android_devices = android->GetInputDevices();
devices.insert(devices.end(), android_devices.begin(), android_devices.end());
#endif
@ -176,7 +176,7 @@ struct InputSubsystem::Impl {
if (engine == mouse->GetEngineName()) {
return mouse;
}
#ifdef ANDROID
#ifdef __ANDROID__
if (engine == android->GetEngineName()) {
return android;
}
@ -261,7 +261,7 @@ struct InputSubsystem::Impl {
if (engine == mouse->GetEngineName()) {
return true;
}
#ifdef ANDROID
#ifdef __ANDROID__
if (engine == android->GetEngineName()) {
return true;
}
@ -294,7 +294,7 @@ struct InputSubsystem::Impl {
void BeginConfiguration() {
keyboard->BeginConfiguration();
mouse->BeginConfiguration();
#ifdef ANDROID
#ifdef __ANDROID__
android->BeginConfiguration();
#endif
#ifdef ENABLE_LIBUSB
@ -310,7 +310,7 @@ struct InputSubsystem::Impl {
void EndConfiguration() {
keyboard->EndConfiguration();
mouse->EndConfiguration();
#ifdef ANDROID
#ifdef __ANDROID__
android->EndConfiguration();
#endif
#ifdef ENABLE_LIBUSB
@ -355,7 +355,7 @@ struct InputSubsystem::Impl {
std::shared_ptr<Joycons> joycon;
#endif
#ifdef ANDROID
#ifdef __ANDROID__
std::shared_ptr<Android> android;
#endif
};
@ -412,7 +412,7 @@ const Camera* InputSubsystem::GetCamera() const {
return impl->camera.get();
}
#ifdef ANDROID
#ifdef __ANDROID__
Android* InputSubsystem::GetAndroid() {
return impl->android.get();
}