mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-06-23 21:19:55 -05:00
Move camera code to CemuInput
Compiling the precompiled headers for `CemuCamera` took longer than compiling `CemuCamera` itself, so it just ends up being noticeably faster to just add it to one of the existing sublibs. It probably wasn't a problem for MSVC because precompiled header reuse works there, but I'm not using MSVC
This commit is contained in:
parent
02c063e44b
commit
cfd148ac36
|
|
@ -59,7 +59,6 @@ add_subdirectory(Cemu)
|
|||
add_subdirectory(config)
|
||||
add_subdirectory(input)
|
||||
add_subdirectory(audio)
|
||||
add_subdirectory(camera)
|
||||
add_subdirectory(util)
|
||||
add_subdirectory(imgui)
|
||||
add_subdirectory(resource)
|
||||
|
|
@ -215,7 +214,6 @@ set_target_properties(CemuBin PROPERTIES
|
|||
target_link_libraries(CemuBin PRIVATE
|
||||
CemuAudio
|
||||
CemuCafe
|
||||
CemuCamera
|
||||
CemuCommon
|
||||
CemuComponents
|
||||
CemuConfig
|
||||
|
|
|
|||
|
|
@ -647,7 +647,6 @@ endif()
|
|||
|
||||
target_link_libraries(CemuCafe PRIVATE
|
||||
CemuCommon
|
||||
CemuCamera
|
||||
CemuGui
|
||||
ZArchive::zarchive
|
||||
imguiImpl
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "Cafe/OS/libs/coreinit/coreinit_Alarm.h"
|
||||
#include "Cafe/OS/libs/coreinit/coreinit_Time.h"
|
||||
#include "Cafe/HW/Espresso/PPCCallback.h"
|
||||
#include "camera/CameraManager.h"
|
||||
#include "input/camera/CameraManager.h"
|
||||
#include "Common/CafeString.h"
|
||||
#include "OS/common/OSUtil.h"
|
||||
#include "util/helpers/ringbuffer.h"
|
||||
|
|
@ -277,13 +277,13 @@ namespace camera
|
|||
|
||||
void RPLMapped() override
|
||||
{
|
||||
cafeExportRegister("camera", CAMGetMemReq, LogType::Placeholder);
|
||||
cafeExportRegister("camera", CAMCheckMemSegmentation, LogType::Placeholder);
|
||||
cafeExportRegister("camera", CAMInit, LogType::Placeholder);
|
||||
cafeExportRegister("camera", CAMExit, LogType::Placeholder);
|
||||
cafeExportRegister("camera", CAMOpen, LogType::Placeholder);
|
||||
cafeExportRegister("camera", CAMClose, LogType::Placeholder);
|
||||
cafeExportRegister("camera", CAMSubmitTargetSurface, LogType::Placeholder);
|
||||
cafeExportRegister("camera", CAMGetMemReq, LogType::InputAPI);
|
||||
cafeExportRegister("camera", CAMCheckMemSegmentation, LogType::InputAPI);
|
||||
cafeExportRegister("camera", CAMInit, LogType::InputAPI);
|
||||
cafeExportRegister("camera", CAMExit, LogType::InputAPI);
|
||||
cafeExportRegister("camera", CAMOpen, LogType::InputAPI);
|
||||
cafeExportRegister("camera", CAMClose, LogType::InputAPI);
|
||||
cafeExportRegister("camera", CAMSubmitTargetSurface, LogType::InputAPI);
|
||||
};
|
||||
|
||||
void rpl_entry(uint32 moduleHandle, coreinit::RplEntryReason reason) override
|
||||
|
|
|
|||
|
|
@ -1,19 +0,0 @@
|
|||
add_library(CemuCamera
|
||||
CameraManager.cpp
|
||||
CameraManager.h
|
||||
Rgb2Nv12.cpp
|
||||
Rgb2Nv12.h
|
||||
)
|
||||
|
||||
cemu_use_precompiled_header(CemuCamera)
|
||||
|
||||
set_property(TARGET CemuCamera PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
|
||||
target_include_directories(CemuCamera PUBLIC "../")
|
||||
target_link_libraries(CemuCamera
|
||||
PRIVATE
|
||||
CemuCommon
|
||||
CemuConfig
|
||||
CemuUtil
|
||||
glm::glm
|
||||
openpnp-capture)
|
||||
|
|
@ -161,7 +161,6 @@ target_link_libraries(CemuWxGui PRIVATE
|
|||
CemuComponents
|
||||
pugixml::pugixml
|
||||
CemuCafe
|
||||
CemuCamera
|
||||
PUBLIC
|
||||
CURL::libcurl
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "CameraSettingsWindow.h"
|
||||
|
||||
#include "camera/CameraManager.h"
|
||||
#include "input/camera/CameraManager.h"
|
||||
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/dcbuffer.h>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@ add_library(CemuInput
|
|||
api/Keyboard/KeyboardControllerProvider.cpp
|
||||
api/Keyboard/KeyboardController.cpp
|
||||
api/Keyboard/KeyboardController.h
|
||||
camera/CameraManager.cpp
|
||||
camera/CameraManager.h
|
||||
camera/Rgb2Nv12.cpp
|
||||
camera/Rgb2Nv12.h
|
||||
emulated/ProController.cpp
|
||||
emulated/EmulatedController.h
|
||||
emulated/EmulatedController.cpp
|
||||
|
|
@ -103,6 +107,7 @@ target_include_directories(CemuInput PUBLIC "../")
|
|||
target_link_libraries(CemuInput PRIVATE
|
||||
CemuCommon
|
||||
CemuGui
|
||||
openpnp-capture
|
||||
)
|
||||
|
||||
if (ENABLE_BLUEZ)
|
||||
|
|
|
|||
|
|
@ -51,15 +51,15 @@ namespace CameraManager
|
|||
CapFormatInfo formatInfo;
|
||||
if (Cap_getFormatInfo(s_ctx, device, formatId, &formatInfo) != CAPRESULT_OK)
|
||||
continue;
|
||||
cemuLog_log(LogType::Force, "{}: {} {}x{} @ {} fps, {} bpp", formatId, FourCC(formatInfo.fourcc),
|
||||
cemuLog_log(LogType::InputAPI, "{}: {} {}x{} @ {} fps, {} bpp", formatId, FourCC(formatInfo.fourcc),
|
||||
formatInfo.width, formatInfo.height, formatInfo.fps, formatInfo.bpp);
|
||||
if (formatInfo.width == CAMERA_WIDTH && formatInfo.height == CAMERA_HEIGHT)
|
||||
{
|
||||
cemuLog_log(LogType::Force, "Selected video format {}", formatId);
|
||||
cemuLog_log(LogType::InputAPI, "Selected video format {}", formatId);
|
||||
return formatId;
|
||||
}
|
||||
}
|
||||
cemuLog_log(LogType::Force, "Failed to find suitable video format");
|
||||
cemuLog_log(LogType::InputAPI, "Failed to find suitable video format");
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user