Skip to content

Commit

Permalink
Run clang-format
Browse files Browse the repository at this point in the history
`find . -regex '.*\.\(cpp\|hpp\|cu\|cuh\|c\|h\)' -exec clang-format -style=file -i {} \;`
  • Loading branch information
GaryOderNichts committed Nov 18, 2024
1 parent 1873042 commit f45c8e8
Show file tree
Hide file tree
Showing 307 changed files with 12,149 additions and 10,457 deletions.
14 changes: 7 additions & 7 deletions include/avm/drc.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,24 @@ extern "C" {

typedef enum AVMDrcScanMode
{
AVM_DRC_SCAN_MODE_UNKNOWN_0 = 0,
AVM_DRC_SCAN_MODE_UNKNOWN_1 = 1,
AVM_DRC_SCAN_MODE_UNKNOWN_3 = 3,
AVM_DRC_SCAN_MODE_UNKNOWN_0 = 0,
AVM_DRC_SCAN_MODE_UNKNOWN_1 = 1,
AVM_DRC_SCAN_MODE_UNKNOWN_3 = 3,
AVM_DRC_SCAN_MODE_UNKNOWN_255 = 255,
} AVMDrcScanMode;

typedef enum AVMDrcMode
{
AVM_DRC_MODE_NONE = 0,
AVM_DRC_MODE_NONE = 0,
AVM_DRC_MODE_SINGLE = 1,
AVM_DRC_MODE_DOUBLE = 2,
} AVMDrcMode;

typedef enum AVMDrcSystemAudioMode
{
AVM_DRC_SYSTEM_AUDIO_MODE_UNKNOWN_0 = 0, // mono?
AVM_DRC_SYSTEM_AUDIO_MODE_UNKNOWN_1 = 1, // stereo?
AVM_DRC_SYSTEM_AUDIO_MODE_SURROUND = 2,
AVM_DRC_SYSTEM_AUDIO_MODE_UNKNOWN_0 = 0, // mono?
AVM_DRC_SYSTEM_AUDIO_MODE_UNKNOWN_1 = 1, // stereo?
AVM_DRC_SYSTEM_AUDIO_MODE_SURROUND = 2,
} AVMDrcSystemAudioMode;

/**
Expand Down
24 changes: 12 additions & 12 deletions include/avm/tv.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ typedef enum AVMTvAspectRatio

typedef enum AVMTvResolution
{
AVM_TV_RESOLUTION_576I = 1,
AVM_TV_RESOLUTION_480I = 2,
AVM_TV_RESOLUTION_480P = 3,
AVM_TV_RESOLUTION_720P = 4,
AVM_TV_RESOLUTION_720P_3D = 5,
AVM_TV_RESOLUTION_1080I = 6,
AVM_TV_RESOLUTION_1080P = 7,
AVM_TV_RESOLUTION_480I_PAL60 = 10,
AVM_TV_RESOLUTION_576P = 11,
AVM_TV_RESOLUTION_720P_50HZ = 12,
AVM_TV_RESOLUTION_1080I_50HZ = 13,
AVM_TV_RESOLUTION_1080P_50HZ = 14,
AVM_TV_RESOLUTION_576I = 1,
AVM_TV_RESOLUTION_480I = 2,
AVM_TV_RESOLUTION_480P = 3,
AVM_TV_RESOLUTION_720P = 4,
AVM_TV_RESOLUTION_720P_3D = 5,
AVM_TV_RESOLUTION_1080I = 6,
AVM_TV_RESOLUTION_1080P = 7,
AVM_TV_RESOLUTION_480I_PAL60 = 10,
AVM_TV_RESOLUTION_576P = 11,
AVM_TV_RESOLUTION_720P_50HZ = 12,
AVM_TV_RESOLUTION_1080I_50HZ = 13,
AVM_TV_RESOLUTION_1080P_50HZ = 14,
} AVMTvResolution;

typedef enum AVMTvVideoRegion
Expand Down
62 changes: 31 additions & 31 deletions include/camera/camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
extern "C" {
#endif

#define CAMERA_WIDTH 640
#define CAMERA_PITCH 768
#define CAMERA_HEIGHT 480
#define CAMERA_WIDTH 640
#define CAMERA_PITCH 768
#define CAMERA_HEIGHT 480

#define CAMERA_Y_BUFFER_SIZE (CAMERA_PITCH * CAMERA_HEIGHT)
#define CAMERA_UV_BUFFER_SIZE (CAMERA_PITCH * CAMERA_HEIGHT / 2)
#define CAMERA_YUV_BUFFER_SIZE (CAMERA_Y_BUFFER_SIZE + CAMERA_UV_BUFFER_SIZE)
#define CAMERA_Y_BUFFER_SIZE (CAMERA_PITCH * CAMERA_HEIGHT)
#define CAMERA_UV_BUFFER_SIZE (CAMERA_PITCH * CAMERA_HEIGHT / 2)
#define CAMERA_YUV_BUFFER_SIZE (CAMERA_Y_BUFFER_SIZE + CAMERA_UV_BUFFER_SIZE)

#define CAMERA_YUV_BUFFER_ALIGNMENT 256

Expand All @@ -34,35 +34,35 @@ typedef struct CAMSurface CAMSurface;

typedef enum CamError
{
CAMERA_ERROR_OK = 0,
CAMERA_ERROR_INVALID_ARG = -1,
CAMERA_ERROR_INVALID_HANDLE = -2,
CAMERA_ERROR_TOO_MANY_SURFACES = -4,
CAMERA_ERROR_INSUFFICIENT_MEMORY = -5,
CAMERA_ERROR_NOT_READY = -6,
CAMERA_ERROR_UNINITIALIZED = -8,
CAMERA_ERROR_UVC = -9,
CAMERA_ERROR_UVD_CONTEXT = -10,
CAMERA_ERROR_DEVICE_IN_USE = -12,
CAMERA_ERROR_UVD_SESSION = -13,
CAMERA_ERROR_SEGMENT_VIOLATION = -15
CAMERA_ERROR_OK = 0,
CAMERA_ERROR_INVALID_ARG = -1,
CAMERA_ERROR_INVALID_HANDLE = -2,
CAMERA_ERROR_TOO_MANY_SURFACES = -4,
CAMERA_ERROR_INSUFFICIENT_MEMORY = -5,
CAMERA_ERROR_NOT_READY = -6,
CAMERA_ERROR_UNINITIALIZED = -8,
CAMERA_ERROR_UVC = -9,
CAMERA_ERROR_UVD_CONTEXT = -10,
CAMERA_ERROR_DEVICE_IN_USE = -12,
CAMERA_ERROR_UVD_SESSION = -13,
CAMERA_ERROR_SEGMENT_VIOLATION = -15
} CamError;

typedef enum CamFps
{
CAMERA_FPS_15 = 0,
CAMERA_FPS_30 = 1
CAMERA_FPS_15 = 0,
CAMERA_FPS_30 = 1
} CamFps;

typedef enum CamStreamType
{
CAMERA_STREAM_TYPE_1 = 0
CAMERA_STREAM_TYPE_1 = 0
} CamStreamType;

typedef enum CamEventType
{
CAMERA_DECODE_DONE = 0,
CAMERA_DRC_DETACH = 1
CAMERA_DECODE_DONE = 0,
CAMERA_DRC_DETACH = 1
} CamEventType;

struct CAMEventData
Expand All @@ -74,7 +74,7 @@ struct CAMEventData
struct
{
//! Pointer to the buffer of the decoded image
void* surfaceBuffer;
void *surfaceBuffer;
//! Handle of instance
CAMHandle handle;
//! TRUE if decode failed
Expand All @@ -100,7 +100,7 @@ WUT_CHECK_OFFSET(CAMEventData, 0x08, detach.handle);
WUT_CHECK_OFFSET(CAMEventData, 0x04, args);
WUT_CHECK_SIZE(CAMEventData, 0x10);

typedef void(*CAMEventHandler)(CAMEventData *camEventData);
typedef void (*CAMEventHandler)(CAMEventData *camEventData);

struct CAMMode
{
Expand Down Expand Up @@ -192,26 +192,26 @@ WUT_CHECK_SIZE(CAMSurface, 0x20);
* Initialize the camera
* \returns camera handle on success, and -1 on failure
*/
CAMHandle
CAMHandle
CAMInit(int instance, CAMSetupInfo *setupInfo, CAMError *err);

/**
* Deinitialize and clean up
*/
void
void
CAMExit(CAMHandle handle);

/**
* Start recording and decoding frames
*/
CAMError
CAMError
CAMOpen(CAMHandle handle);

/**
* Stops recording and decoding.
* Automatically called when the process is moved to background
*/
CAMError
CAMError
CAMClose(CAMHandle handle);

/**
Expand All @@ -228,13 +228,13 @@ CAMGetMemReq(CAMStreamInfo *streamInfo);
* Up to 20 surfaces may be queued.
* Surface data is returned in the NV12 format
*/
CAMError
CAMError
CAMSubmitTargetSurface(CAMHandle handle, CAMSurface *surface);

/**
* Checks whether memory is segmented correctly to be used with the camera library
*/
CAMError
CAMError
CAMCheckMemSegmentation(void *pMem, uint32_t size);

#ifdef __cplusplus
Expand Down
2 changes: 1 addition & 1 deletion include/coreinit/alarm.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once
#include <wut.h>
#include "context.h"
#include "threadqueue.h"
#include "time.h"
#include "context.h"

/**
* \defgroup coreinit_alarms Alarms
Expand Down
70 changes: 35 additions & 35 deletions include/coreinit/bsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,45 +18,45 @@ typedef uint32_t BSPConsoleTypeRaw;

typedef enum BSPErrors
{
BSP_ERROR_OK = 0,
BSP_ERROR_IOS_ERROR = 0x40,
BSP_ERROR_RESPONSE_TOO_LARGE = 0x80,
BSP_ERROR_OK = 0,
BSP_ERROR_IOS_ERROR = 0x40,
BSP_ERROR_RESPONSE_TOO_LARGE = 0x80,
} BSPErrors;

typedef enum BSPHardwareVersions
{
BSP_HARDWARE_VERSION_UNKNOWN = 0x00000000,

// vWii Hardware Versions
BSP_HARDWARE_VERSION_HOLLYWOOD_ENG_SAMPLE_1 = 0x00000001,
BSP_HARDWARE_VERSION_HOLLYWOOD_ENG_SAMPLE_2 = 0x10000001,
BSP_HARDWARE_VERSION_HOLLYWOOD_PROD_FOR_WII = 0x10100001,
BSP_HARDWARE_VERSION_HOLLYWOOD_CORTADO = 0x10100008,
BSP_HARDWARE_VERSION_HOLLYWOOD_CORTADO_ESPRESSO = 0x1010000C,
BSP_HARDWARE_VERSION_BOLLYWOOD = 0x20000001,
BSP_HARDWARE_VERSION_BOLLYWOOD_PROD_FOR_WII = 0x20100001,

// WiiU Hardware Versions
BSP_HARDWARE_VERSION_LATTE_A11_EV = 0x21100010,
BSP_HARDWARE_VERSION_LATTE_A11_CAT = 0x21100020,
BSP_HARDWARE_VERSION_LATTE_A12_EV = 0x21200010,
BSP_HARDWARE_VERSION_LATTE_A12_CAT = 0x21200020,
BSP_HARDWARE_VERSION_LATTE_A2X_EV = 0x22100010,
BSP_HARDWARE_VERSION_LATTE_A2X_CAT = 0x22100020,
BSP_HARDWARE_VERSION_LATTE_A3X_EV = 0x23100010,
BSP_HARDWARE_VERSION_LATTE_A3X_CAT = 0x23100020,
BSP_HARDWARE_VERSION_LATTE_A3X_CAFE = 0x23100028,
BSP_HARDWARE_VERSION_LATTE_A4X_EV = 0x24100010,
BSP_HARDWARE_VERSION_LATTE_A4X_CAT = 0x24100020,
BSP_HARDWARE_VERSION_LATTE_A4X_CAFE = 0x24100028,
BSP_HARDWARE_VERSION_LATTE_A5X_EV = 0x25100010,
BSP_HARDWARE_VERSION_LATTE_A5X_EV_Y = 0x25100011,
BSP_HARDWARE_VERSION_LATTE_A5X_CAT = 0x25100020,
BSP_HARDWARE_VERSION_LATTE_A5X_CAFE = 0x25100028,
BSP_HARDWARE_VERSION_LATTE_B1X_EV = 0x26100010,
BSP_HARDWARE_VERSION_LATTE_B1X_EV_Y = 0x26100011,
BSP_HARDWARE_VERSION_LATTE_B1X_CAT = 0x26100020,
BSP_HARDWARE_VERSION_LATTE_B1X_CAFE = 0x26100028
BSP_HARDWARE_VERSION_UNKNOWN = 0x00000000,

// vWii Hardware Versions
BSP_HARDWARE_VERSION_HOLLYWOOD_ENG_SAMPLE_1 = 0x00000001,
BSP_HARDWARE_VERSION_HOLLYWOOD_ENG_SAMPLE_2 = 0x10000001,
BSP_HARDWARE_VERSION_HOLLYWOOD_PROD_FOR_WII = 0x10100001,
BSP_HARDWARE_VERSION_HOLLYWOOD_CORTADO = 0x10100008,
BSP_HARDWARE_VERSION_HOLLYWOOD_CORTADO_ESPRESSO = 0x1010000C,
BSP_HARDWARE_VERSION_BOLLYWOOD = 0x20000001,
BSP_HARDWARE_VERSION_BOLLYWOOD_PROD_FOR_WII = 0x20100001,

// WiiU Hardware Versions
BSP_HARDWARE_VERSION_LATTE_A11_EV = 0x21100010,
BSP_HARDWARE_VERSION_LATTE_A11_CAT = 0x21100020,
BSP_HARDWARE_VERSION_LATTE_A12_EV = 0x21200010,
BSP_HARDWARE_VERSION_LATTE_A12_CAT = 0x21200020,
BSP_HARDWARE_VERSION_LATTE_A2X_EV = 0x22100010,
BSP_HARDWARE_VERSION_LATTE_A2X_CAT = 0x22100020,
BSP_HARDWARE_VERSION_LATTE_A3X_EV = 0x23100010,
BSP_HARDWARE_VERSION_LATTE_A3X_CAT = 0x23100020,
BSP_HARDWARE_VERSION_LATTE_A3X_CAFE = 0x23100028,
BSP_HARDWARE_VERSION_LATTE_A4X_EV = 0x24100010,
BSP_HARDWARE_VERSION_LATTE_A4X_CAT = 0x24100020,
BSP_HARDWARE_VERSION_LATTE_A4X_CAFE = 0x24100028,
BSP_HARDWARE_VERSION_LATTE_A5X_EV = 0x25100010,
BSP_HARDWARE_VERSION_LATTE_A5X_EV_Y = 0x25100011,
BSP_HARDWARE_VERSION_LATTE_A5X_CAT = 0x25100020,
BSP_HARDWARE_VERSION_LATTE_A5X_CAFE = 0x25100028,
BSP_HARDWARE_VERSION_LATTE_B1X_EV = 0x26100010,
BSP_HARDWARE_VERSION_LATTE_B1X_EV_Y = 0x26100011,
BSP_HARDWARE_VERSION_LATTE_B1X_CAT = 0x26100020,
BSP_HARDWARE_VERSION_LATTE_B1X_CAFE = 0x26100028
} BSPHardwareVersions;

BSPError
Expand Down
2 changes: 1 addition & 1 deletion include/coreinit/cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ DCTouchRange(void *addr,
void
ICInvalidateRange(void *addr,
uint32_t size);

void
OSMemoryBarrier();

Expand Down
8 changes: 4 additions & 4 deletions include/coreinit/codegen.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ extern "C" {
//! The memory permissions for the codegen area.
typedef enum OSCodegenSecMode
{
//! The area can be read or written to, but not executed.
CODEGEN_RW_ = 0,
//! The area can be read or executed, but not written to.
CODEGEN_R_X = 1,
//! The area can be read or written to, but not executed.
CODEGEN_RW_ = 0,
//! The area can be read or executed, but not written to.
CODEGEN_R_X = 1,
} OSCodegenSecMode;

/**
Expand Down
7 changes: 4 additions & 3 deletions include/coreinit/context.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ extern "C" {
//! A bitfield of enum OS_CONTEXT_STATE.
typedef uint16_t OSContextState;

enum OS_CONTEXT_STATE {
OS_CONTEXT_STATE_OSCALLBACK = 1 << 3,
OS_CONTEXT_STATE_USERMODE_SAVED = 1 << 4
enum OS_CONTEXT_STATE
{
OS_CONTEXT_STATE_OSCALLBACK = 1 << 3,
OS_CONTEXT_STATE_USERMODE_SAVED = 1 << 4
};

typedef struct OSContext OSContext;
Expand Down
32 changes: 17 additions & 15 deletions include/coreinit/cosreport.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,44 +12,46 @@
extern "C" {
#endif

typedef enum COSReportLevel{
COS_REPORT_LEVEL_ERROR = 0,
COS_REPORT_LEVEL_WARN = 1,
COS_REPORT_LEVEL_INFO = 2,
COS_REPORT_LEVEL_VERBOSE = 3,
typedef enum COSReportLevel
{
COS_REPORT_LEVEL_ERROR = 0,
COS_REPORT_LEVEL_WARN = 1,
COS_REPORT_LEVEL_INFO = 2,
COS_REPORT_LEVEL_VERBOSE = 3,
} COSReportLevel;

typedef enum COSReportModule{
COS_REPORT_MODULE_UNKNOWN_0 = 0,
COS_REPORT_MODULE_UNKNOWN_1 = 1,
COS_REPORT_MODULE_UNKNOWN_2 = 2,
COS_REPORT_MODULE_UNKNOWN_5 = 5,
typedef enum COSReportModule
{
COS_REPORT_MODULE_UNKNOWN_0 = 0,
COS_REPORT_MODULE_UNKNOWN_1 = 1,
COS_REPORT_MODULE_UNKNOWN_2 = 2,
COS_REPORT_MODULE_UNKNOWN_5 = 5,
} COSReportModule;

void
COSVReport(COSReportModule module,
COSReportLevel level,
const char* fmt,
const char *fmt,
...);

void
COSError(COSReportModule module,
const char* fmt,
const char *fmt,
...);

void
COSInfo(COSReportModule module,
const char* fmt,
const char *fmt,
...);

void
COSVerbose(COSReportModule module,
const char* fmt,
const char *fmt,
...);

void
COSWarn(COSReportModule module,
const char* fmt,
const char *fmt,
...);

#ifdef __cplusplus
Expand Down
Loading

0 comments on commit f45c8e8

Please sign in to comment.