mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 05:40:04 +00:00 
			
		
		
		
	Merge pull request #5512 from vitor-k/untangle-includes
Forward declare some classes and remove some unnecessary includes
This commit is contained in:
		
						commit
						e48110bdf4
					
				
					 19 changed files with 156 additions and 125 deletions
				
			
		|  | @ -3,11 +3,10 @@ | ||||||
| // Refer to the license.txt file included.
 | // Refer to the license.txt file included.
 | ||||||
| 
 | 
 | ||||||
| #include <algorithm> | #include <algorithm> | ||||||
|  | #include <array> | ||||||
| #include <cstring> | #include <cstring> | ||||||
| #include <QImage> | #include <QImage> | ||||||
| #include "citra_qt/camera/camera_util.h" | #include "citra_qt/camera/camera_util.h" | ||||||
| #include "core/frontend/camera/factory.h" |  | ||||||
| #include "core/frontend/camera/interface.h" |  | ||||||
| 
 | 
 | ||||||
| namespace CameraUtil { | namespace CameraUtil { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -5,6 +5,8 @@ | ||||||
| #include <QMessageBox> | #include <QMessageBox> | ||||||
| #include "citra_qt/camera/camera_util.h" | #include "citra_qt/camera/camera_util.h" | ||||||
| #include "citra_qt/camera/qt_camera_base.h" | #include "citra_qt/camera/qt_camera_base.h" | ||||||
|  | #include "common/logging/log.h" | ||||||
|  | #include "core/hle/service/cam/cam.h" | ||||||
| 
 | 
 | ||||||
| namespace Camera { | namespace Camera { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -7,6 +7,7 @@ | ||||||
| #include <QMessageBox> | #include <QMessageBox> | ||||||
| #include <QThread> | #include <QThread> | ||||||
| #include "citra_qt/camera/still_image_camera.h" | #include "citra_qt/camera/still_image_camera.h" | ||||||
|  | #include "common/logging/log.h" | ||||||
| 
 | 
 | ||||||
| namespace Camera { | namespace Camera { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -2,7 +2,6 @@ | ||||||
| // Licensed under GPLv2 or any later version
 | // Licensed under GPLv2 or any later version
 | ||||||
| // Refer to the license.txt file included.
 | // Refer to the license.txt file included.
 | ||||||
| 
 | 
 | ||||||
| #include <memory> |  | ||||||
| #include <QCameraInfo> | #include <QCameraInfo> | ||||||
| #include <QDirIterator> | #include <QDirIterator> | ||||||
| #include <QFileDialog> | #include <QFileDialog> | ||||||
|  | @ -12,6 +11,9 @@ | ||||||
| #include "citra_qt/configuration/configure_camera.h" | #include "citra_qt/configuration/configure_camera.h" | ||||||
| #include "citra_qt/uisettings.h" | #include "citra_qt/uisettings.h" | ||||||
| #include "core/core.h" | #include "core/core.h" | ||||||
|  | #include "core/frontend/camera/factory.h" | ||||||
|  | #include "core/frontend/camera/interface.h" | ||||||
|  | #include "core/hle/service/cam/cam.h" | ||||||
| #include "core/settings.h" | #include "core/settings.h" | ||||||
| #include "ui_configure_camera.h" | #include "ui_configure_camera.h" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -4,8 +4,13 @@ | ||||||
| 
 | 
 | ||||||
| #pragma once | #pragma once | ||||||
| 
 | 
 | ||||||
| #include "core/frontend/camera/factory.h" | #include <array> | ||||||
| #include "core/frontend/camera/interface.h" | #include <memory> | ||||||
|  | #include <string> | ||||||
|  | 
 | ||||||
|  | namespace Camera { | ||||||
|  | class CameraInterface; | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| namespace Ui { | namespace Ui { | ||||||
| class ConfigureCamera; | class ConfigureCamera; | ||||||
|  |  | ||||||
|  | @ -10,6 +10,7 @@ | ||||||
| #include <QVBoxLayout> | #include <QVBoxLayout> | ||||||
| #include "citra_qt/configuration/configure_motion_touch.h" | #include "citra_qt/configuration/configure_motion_touch.h" | ||||||
| #include "citra_qt/configuration/configure_touch_from_button.h" | #include "citra_qt/configuration/configure_touch_from_button.h" | ||||||
|  | #include "common/logging/log.h" | ||||||
| #include "input_common/main.h" | #include "input_common/main.h" | ||||||
| #include "ui_configure_motion_touch.h" | #include "ui_configure_motion_touch.h" | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -7,6 +7,7 @@ | ||||||
| #include <QMouseEvent> | #include <QMouseEvent> | ||||||
| #include <QPainter> | #include <QPainter> | ||||||
| #include <QString> | #include <QString> | ||||||
|  | #include <QTimer> | ||||||
| #include "citra_qt/debugger/profiler.h" | #include "citra_qt/debugger/profiler.h" | ||||||
| #include "citra_qt/util/util.h" | #include "citra_qt/util/util.h" | ||||||
| #include "common/common_types.h" | #include "common/common_types.h" | ||||||
|  |  | ||||||
|  | @ -4,9 +4,7 @@ | ||||||
| 
 | 
 | ||||||
| #pragma once | #pragma once | ||||||
| 
 | 
 | ||||||
| #include <QAbstractItemModel> | #include <QWidget> | ||||||
| #include <QDockWidget> |  | ||||||
| #include <QTimer> |  | ||||||
| #include "common/microprofile.h" | #include "common/microprofile.h" | ||||||
| 
 | 
 | ||||||
| class MicroProfileDialog : public QWidget { | class MicroProfileDialog : public QWidget { | ||||||
|  |  | ||||||
|  | @ -9,6 +9,7 @@ | ||||||
| #include <QDesktopWidget> | #include <QDesktopWidget> | ||||||
| #include <QFileDialog> | #include <QFileDialog> | ||||||
| #include <QFutureWatcher> | #include <QFutureWatcher> | ||||||
|  | #include <QLabel> | ||||||
| #include <QMessageBox> | #include <QMessageBox> | ||||||
| #include <QOpenGLFunctions_3_3_Core> | #include <QOpenGLFunctions_3_3_Core> | ||||||
| #include <QSysInfo> | #include <QSysInfo> | ||||||
|  |  | ||||||
|  | @ -6,7 +6,6 @@ | ||||||
| 
 | 
 | ||||||
| #include <array> | #include <array> | ||||||
| #include <memory> | #include <memory> | ||||||
| #include <QLabel> |  | ||||||
| #include <QMainWindow> | #include <QMainWindow> | ||||||
| #include <QTimer> | #include <QTimer> | ||||||
| #include <QTranslator> | #include <QTranslator> | ||||||
|  | @ -40,6 +39,7 @@ class MultiplayerState; | ||||||
| class ProfilerWidget; | class ProfilerWidget; | ||||||
| template <typename> | template <typename> | ||||||
| class QFutureWatcher; | class QFutureWatcher; | ||||||
|  | class QLabel; | ||||||
| class QProgressBar; | class QProgressBar; | ||||||
| class RegistersWidget; | class RegistersWidget; | ||||||
| class Updater; | class Updater; | ||||||
|  |  | ||||||
|  | @ -234,6 +234,7 @@ add_library(core STATIC | ||||||
|     hle/service/cam/cam.h |     hle/service/cam/cam.h | ||||||
|     hle/service/cam/cam_c.cpp |     hle/service/cam/cam_c.cpp | ||||||
|     hle/service/cam/cam_c.h |     hle/service/cam/cam_c.h | ||||||
|  |     hle/service/cam/cam_params.h | ||||||
|     hle/service/cam/cam_q.cpp |     hle/service/cam/cam_q.cpp | ||||||
|     hle/service/cam/cam_q.h |     hle/service/cam/cam_q.h | ||||||
|     hle/service/cam/cam_s.cpp |     hle/service/cam/cam_s.cpp | ||||||
|  |  | ||||||
|  | @ -3,6 +3,7 @@ | ||||||
| // Refer to the license.txt file included.
 | // Refer to the license.txt file included.
 | ||||||
| 
 | 
 | ||||||
| #include <chrono> | #include <chrono> | ||||||
|  | #include <future> | ||||||
| #include <vector> | #include <vector> | ||||||
| #include "announce_multiplayer_session.h" | #include "announce_multiplayer_session.h" | ||||||
| #include "common/announce_multiplayer_room.h" | #include "common/announce_multiplayer_room.h" | ||||||
|  |  | ||||||
|  | @ -3,6 +3,7 @@ | ||||||
| // Refer to the license.txt file included.
 | // Refer to the license.txt file included.
 | ||||||
| 
 | 
 | ||||||
| #include "core/frontend/camera/blank_camera.h" | #include "core/frontend/camera/blank_camera.h" | ||||||
|  | #include "core/hle/service/cam/cam.h" | ||||||
| 
 | 
 | ||||||
| namespace Camera { | namespace Camera { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -6,7 +6,11 @@ | ||||||
| 
 | 
 | ||||||
| #include <vector> | #include <vector> | ||||||
| #include "common/common_types.h" | #include "common/common_types.h" | ||||||
| #include "core/hle/service/cam/cam.h" | #include "core/hle/service/cam/cam_params.h" | ||||||
|  | 
 | ||||||
|  | namespace Service::CAM { | ||||||
|  | struct Resolution; | ||||||
|  | } // namespace Service::CAM
 | ||||||
| 
 | 
 | ||||||
| namespace Camera { | namespace Camera { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -18,6 +18,7 @@ | ||||||
| #include "common/swap.h" | #include "common/swap.h" | ||||||
| #include "core/global.h" | #include "core/global.h" | ||||||
| #include "core/hle/result.h" | #include "core/hle/result.h" | ||||||
|  | #include "core/hle/service/cam/cam_params.h" | ||||||
| #include "core/hle/service/service.h" | #include "core/hle/service/service.h" | ||||||
| 
 | 
 | ||||||
| namespace Core { | namespace Core { | ||||||
|  | @ -38,120 +39,6 @@ class Process; | ||||||
| 
 | 
 | ||||||
| namespace Service::CAM { | namespace Service::CAM { | ||||||
| 
 | 
 | ||||||
| enum CameraIndex { |  | ||||||
|     OuterRightCamera = 0, |  | ||||||
|     InnerCamera = 1, |  | ||||||
|     OuterLeftCamera = 2, |  | ||||||
| 
 |  | ||||||
|     NumCameras = 3, |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| enum class Effect : u8 { |  | ||||||
|     None = 0, |  | ||||||
|     Mono = 1, |  | ||||||
|     Sepia = 2, |  | ||||||
|     Negative = 3, |  | ||||||
|     Negafilm = 4, |  | ||||||
|     Sepia01 = 5, |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| enum class Flip : u8 { |  | ||||||
|     None = 0, |  | ||||||
|     Horizontal = 1, |  | ||||||
|     Vertical = 2, |  | ||||||
|     Reverse = 3, |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| enum class Size : u8 { |  | ||||||
|     VGA = 0, |  | ||||||
|     QVGA = 1, |  | ||||||
|     QQVGA = 2, |  | ||||||
|     CIF = 3, |  | ||||||
|     QCIF = 4, |  | ||||||
|     DS_LCD = 5, |  | ||||||
|     DS_LCDx4 = 6, |  | ||||||
|     CTR_TOP_LCD = 7, |  | ||||||
|     CTR_BOTTOM_LCD = QVGA, |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| enum class FrameRate : u8 { |  | ||||||
|     Rate_15 = 0, |  | ||||||
|     Rate_15_To_5 = 1, |  | ||||||
|     Rate_15_To_2 = 2, |  | ||||||
|     Rate_10 = 3, |  | ||||||
|     Rate_8_5 = 4, |  | ||||||
|     Rate_5 = 5, |  | ||||||
|     Rate_20 = 6, |  | ||||||
|     Rate_20_To_5 = 7, |  | ||||||
|     Rate_30 = 8, |  | ||||||
|     Rate_30_To_5 = 9, |  | ||||||
|     Rate_15_To_10 = 10, |  | ||||||
|     Rate_20_To_10 = 11, |  | ||||||
|     Rate_30_To_10 = 12, |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| enum class ShutterSoundType : u8 { |  | ||||||
|     Normal = 0, |  | ||||||
|     Movie = 1, |  | ||||||
|     MovieEnd = 2, |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| enum class WhiteBalance : u8 { |  | ||||||
|     BalanceAuto = 0, |  | ||||||
|     Balance3200K = 1, |  | ||||||
|     Balance4150K = 2, |  | ||||||
|     Balance5200K = 3, |  | ||||||
|     Balance6000K = 4, |  | ||||||
|     Balance7000K = 5, |  | ||||||
|     BalanceMax = 6, |  | ||||||
|     BalanceNormal = BalanceAuto, |  | ||||||
|     BalanceTungsten = Balance3200K, |  | ||||||
|     BalanceWhiteFluorescentLight = Balance4150K, |  | ||||||
|     BalanceDaylight = Balance5200K, |  | ||||||
|     BalanceCloudy = Balance6000K, |  | ||||||
|     BalanceHorizon = Balance6000K, |  | ||||||
|     BalanceShade = Balance7000K, |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| enum class PhotoMode : u8 { |  | ||||||
|     Normal = 0, |  | ||||||
|     Portrait = 1, |  | ||||||
|     Landscape = 2, |  | ||||||
|     Nightview = 3, |  | ||||||
|     Letter0 = 4, |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| enum class LensCorrection : u8 { |  | ||||||
|     Off = 0, |  | ||||||
|     On70 = 1, |  | ||||||
|     On90 = 2, |  | ||||||
|     Dark = Off, |  | ||||||
|     Normal = On70, |  | ||||||
|     Bright = On90, |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| enum class Contrast : u8 { |  | ||||||
|     Pattern01 = 1, |  | ||||||
|     Pattern02 = 2, |  | ||||||
|     Pattern03 = 3, |  | ||||||
|     Pattern04 = 4, |  | ||||||
|     Pattern05 = 5, |  | ||||||
|     Pattern06 = 6, |  | ||||||
|     Pattern07 = 7, |  | ||||||
|     Pattern08 = 8, |  | ||||||
|     Pattern09 = 9, |  | ||||||
|     Pattern10 = 10, |  | ||||||
|     Pattern11 = 11, |  | ||||||
|     Low = Pattern05, |  | ||||||
|     Normal = Pattern06, |  | ||||||
|     High = Pattern07, |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| enum class OutputFormat : u8 { |  | ||||||
|     YUV422 = 0, |  | ||||||
|     RGB565 = 1, |  | ||||||
| }; |  | ||||||
| 
 |  | ||||||
| /// Stereo camera calibration data.
 | /// Stereo camera calibration data.
 | ||||||
| struct StereoCameraCalibrationData { | struct StereoCameraCalibrationData { | ||||||
|     u8 isValidRotationXY; ///< Bool indicating whether the X and Y rotation data is valid.
 |     u8 isValidRotationXY; ///< Bool indicating whether the X and Y rotation data is valid.
 | ||||||
|  |  | ||||||
							
								
								
									
										125
									
								
								src/core/hle/service/cam/cam_params.h
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										125
									
								
								src/core/hle/service/cam/cam_params.h
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,125 @@ | ||||||
|  | // Copyright 2020 Citra Emulator Project
 | ||||||
|  | // Licensed under GPLv2 or any later version
 | ||||||
|  | // Refer to the license.txt file included.
 | ||||||
|  | 
 | ||||||
|  | #pragma once | ||||||
|  | 
 | ||||||
|  | #include "common/common_types.h" | ||||||
|  | 
 | ||||||
|  | namespace Service::CAM { | ||||||
|  | 
 | ||||||
|  | enum CameraIndex { | ||||||
|  |     OuterRightCamera = 0, | ||||||
|  |     InnerCamera = 1, | ||||||
|  |     OuterLeftCamera = 2, | ||||||
|  | 
 | ||||||
|  |     NumCameras = 3, | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | enum class Effect : u8 { | ||||||
|  |     None = 0, | ||||||
|  |     Mono = 1, | ||||||
|  |     Sepia = 2, | ||||||
|  |     Negative = 3, | ||||||
|  |     Negafilm = 4, | ||||||
|  |     Sepia01 = 5, | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | enum class Flip : u8 { | ||||||
|  |     None = 0, | ||||||
|  |     Horizontal = 1, | ||||||
|  |     Vertical = 2, | ||||||
|  |     Reverse = 3, | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | enum class Size : u8 { | ||||||
|  |     VGA = 0, | ||||||
|  |     QVGA = 1, | ||||||
|  |     QQVGA = 2, | ||||||
|  |     CIF = 3, | ||||||
|  |     QCIF = 4, | ||||||
|  |     DS_LCD = 5, | ||||||
|  |     DS_LCDx4 = 6, | ||||||
|  |     CTR_TOP_LCD = 7, | ||||||
|  |     CTR_BOTTOM_LCD = QVGA, | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | enum class FrameRate : u8 { | ||||||
|  |     Rate_15 = 0, | ||||||
|  |     Rate_15_To_5 = 1, | ||||||
|  |     Rate_15_To_2 = 2, | ||||||
|  |     Rate_10 = 3, | ||||||
|  |     Rate_8_5 = 4, | ||||||
|  |     Rate_5 = 5, | ||||||
|  |     Rate_20 = 6, | ||||||
|  |     Rate_20_To_5 = 7, | ||||||
|  |     Rate_30 = 8, | ||||||
|  |     Rate_30_To_5 = 9, | ||||||
|  |     Rate_15_To_10 = 10, | ||||||
|  |     Rate_20_To_10 = 11, | ||||||
|  |     Rate_30_To_10 = 12, | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | enum class ShutterSoundType : u8 { | ||||||
|  |     Normal = 0, | ||||||
|  |     Movie = 1, | ||||||
|  |     MovieEnd = 2, | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | enum class WhiteBalance : u8 { | ||||||
|  |     BalanceAuto = 0, | ||||||
|  |     Balance3200K = 1, | ||||||
|  |     Balance4150K = 2, | ||||||
|  |     Balance5200K = 3, | ||||||
|  |     Balance6000K = 4, | ||||||
|  |     Balance7000K = 5, | ||||||
|  |     BalanceMax = 6, | ||||||
|  |     BalanceNormal = BalanceAuto, | ||||||
|  |     BalanceTungsten = Balance3200K, | ||||||
|  |     BalanceWhiteFluorescentLight = Balance4150K, | ||||||
|  |     BalanceDaylight = Balance5200K, | ||||||
|  |     BalanceCloudy = Balance6000K, | ||||||
|  |     BalanceHorizon = Balance6000K, | ||||||
|  |     BalanceShade = Balance7000K, | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | enum class PhotoMode : u8 { | ||||||
|  |     Normal = 0, | ||||||
|  |     Portrait = 1, | ||||||
|  |     Landscape = 2, | ||||||
|  |     Nightview = 3, | ||||||
|  |     Letter0 = 4, | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | enum class LensCorrection : u8 { | ||||||
|  |     Off = 0, | ||||||
|  |     On70 = 1, | ||||||
|  |     On90 = 2, | ||||||
|  |     Dark = Off, | ||||||
|  |     Normal = On70, | ||||||
|  |     Bright = On90, | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | enum class Contrast : u8 { | ||||||
|  |     Pattern01 = 1, | ||||||
|  |     Pattern02 = 2, | ||||||
|  |     Pattern03 = 3, | ||||||
|  |     Pattern04 = 4, | ||||||
|  |     Pattern05 = 5, | ||||||
|  |     Pattern06 = 6, | ||||||
|  |     Pattern07 = 7, | ||||||
|  |     Pattern08 = 8, | ||||||
|  |     Pattern09 = 9, | ||||||
|  |     Pattern10 = 10, | ||||||
|  |     Pattern11 = 11, | ||||||
|  |     Low = Pattern05, | ||||||
|  |     Normal = Pattern06, | ||||||
|  |     High = Pattern07, | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | enum class OutputFormat : u8 { | ||||||
|  |     YUV422 = 0, | ||||||
|  |     RGB565 = 1, | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | } // namespace Service::CAM
 | ||||||
|  | @ -8,6 +8,7 @@ | ||||||
| #include "core/core.h" | #include "core/core.h" | ||||||
| #include "core/gdbstub/gdbstub.h" | #include "core/gdbstub/gdbstub.h" | ||||||
| #include "core/hle/kernel/shared_page.h" | #include "core/hle/kernel/shared_page.h" | ||||||
|  | #include "core/hle/service/cam/cam.h" | ||||||
| #include "core/hle/service/hid/hid.h" | #include "core/hle/service/hid/hid.h" | ||||||
| #include "core/hle/service/ir/ir_rst.h" | #include "core/hle/service/ir/ir_rst.h" | ||||||
| #include "core/hle/service/ir/ir_user.h" | #include "core/hle/service/ir/ir_user.h" | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ | ||||||
| #include <unordered_map> | #include <unordered_map> | ||||||
| #include <vector> | #include <vector> | ||||||
| #include "common/common_types.h" | #include "common/common_types.h" | ||||||
| #include "core/hle/service/cam/cam.h" | #include "core/hle/service/cam/cam_params.h" | ||||||
| 
 | 
 | ||||||
| namespace Settings { | namespace Settings { | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -10,6 +10,7 @@ | ||||||
| #include "common/bit_field.h" | #include "common/bit_field.h" | ||||||
| #include "common/common_types.h" | #include "common/common_types.h" | ||||||
| #include "common/vector_math.h" | #include "common/vector_math.h" | ||||||
|  | #include "core/memory.h" | ||||||
| #include "video_core/geometry_pipeline.h" | #include "video_core/geometry_pipeline.h" | ||||||
| #include "video_core/primitive_assembly.h" | #include "video_core/primitive_assembly.h" | ||||||
| #include "video_core/regs.h" | #include "video_core/regs.h" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue