chore(sceVideoOut): throw ex instead of stubs

This commit is contained in:
boykopovar 2026-09-13 13:52:41 +03:00
parent 78f183ced8
commit 7773bbcbf8
2 changed files with 11 additions and 10 deletions

View File

@ -127,6 +127,9 @@ int APS5_VABI sceVideoOutSubmitFlip(int handle, int index, int flipMode, int64_t
if (flipMode < VIDEO_OUT_FLIP_MODE_VSYNC || flipMode > VIDEO_OUT_FLIP_MODE_VSYNC_MULTI) { if (flipMode < VIDEO_OUT_FLIP_MODE_VSYNC || flipMode > VIDEO_OUT_FLIP_MODE_VSYNC_MULTI) {
return VIDEO_OUT_ERROR_INVALID_VALUE; return VIDEO_OUT_ERROR_INVALID_VALUE;
} }
if (flipMode != VIDEO_OUT_FLIP_MODE_VSYNC) {
throw std::runtime_error(std::string(__func__) + ": flip mode not implemented");
}
if (index < VIDEO_OUT_BUFFER_INDEX_BLACK || index >= VIDEO_OUT_BUFFER_NUM_MAX) { if (index < VIDEO_OUT_BUFFER_INDEX_BLACK || index >= VIDEO_OUT_BUFFER_NUM_MAX) {
return VIDEO_OUT_ERROR_INVALID_INDEX; return VIDEO_OUT_ERROR_INVALID_INDEX;
} }

View File

@ -29,7 +29,9 @@ static int validateOutputConfig(int handle, uint64_t mode, const VideoOutOutputO
extern "C" { extern "C" {
int APS5_VABI sceVideoOutOpen(int userId, int busType, int index, const void* param) { int APS5_VABI sceVideoOutOpen(int userId, int busType, int index, const void* param) {
(void)param; if (param != nullptr) {
throw std::runtime_error(std::string(__func__) + ": param not implemented");
}
if (userId != 255 && userId != 0) { if (userId != 255 && userId != 0) {
return VIDEO_OUT_ERROR_INVALID_VALUE; return VIDEO_OUT_ERROR_INVALID_VALUE;
} }
@ -58,9 +60,7 @@ int APS5_VABI sceVideoOutSetFlipRate(int handle, int rate) {
if (rate < 0 || rate > 2) { if (rate < 0 || rate > 2) {
return VIDEO_OUT_ERROR_INVALID_VALUE; return VIDEO_OUT_ERROR_INVALID_VALUE;
} }
std::unique_lock lock(cfg->mutex); throw std::runtime_error(std::string(__func__) + " not implemented");
cfg->flipRate = rate;
return 0;
} }
int APS5_VABI sceVideoOutGetFlipStatus(int handle, VideoOutFlipStatus* status) { int APS5_VABI sceVideoOutGetFlipStatus(int handle, VideoOutFlipStatus* status) {
@ -169,14 +169,14 @@ int APS5_VABI sceVideoOutSetWindowModeMargins(int handle, int top, int bottom) {
if (!VideoOutDriver::Get().IsOpen(handle)) { if (!VideoOutDriver::Get().IsOpen(handle)) {
return VIDEO_OUT_ERROR_INVALID_HANDLE; return VIDEO_OUT_ERROR_INVALID_HANDLE;
} }
return 0; throw std::runtime_error(std::string(__func__) + " not implemented");
} }
int APS5_VABI sceVideoOutLatencyControlWaitBeforeInput(int handle) { int APS5_VABI sceVideoOutLatencyControlWaitBeforeInput(int handle) {
if (!VideoOutDriver::Get().IsOpen(handle)) { if (!VideoOutDriver::Get().IsOpen(handle)) {
return VIDEO_OUT_ERROR_INVALID_HANDLE; return VIDEO_OUT_ERROR_INVALID_HANDLE;
} }
return 0; throw std::runtime_error(std::string(__func__) + " not implemented");
} }
int APS5_VABI sceVideoOutLatencyMeasureSetStartPoint(int handle, uint32_t point) { int APS5_VABI sceVideoOutLatencyMeasureSetStartPoint(int handle, uint32_t point) {
@ -184,7 +184,7 @@ int APS5_VABI sceVideoOutLatencyMeasureSetStartPoint(int handle, uint32_t point)
if (!VideoOutDriver::Get().IsOpen(handle)) { if (!VideoOutDriver::Get().IsOpen(handle)) {
return VIDEO_OUT_ERROR_INVALID_HANDLE; return VIDEO_OUT_ERROR_INVALID_HANDLE;
} }
return 0; throw std::runtime_error(std::string(__func__) + " not implemented");
} }
int APS5_VABI sceVideoOutColorSettingsSetGamma(VideoOutColorSettings* settings, float gamma) { int APS5_VABI sceVideoOutColorSettingsSetGamma(VideoOutColorSettings* settings, float gamma) {
@ -206,9 +206,7 @@ int APS5_VABI sceVideoOutAdjustColor(int handle, const VideoOutColorSettings* se
if (cfg == nullptr) { if (cfg == nullptr) {
return VIDEO_OUT_ERROR_INVALID_HANDLE; return VIDEO_OUT_ERROR_INVALID_HANDLE;
} }
std::unique_lock lock(cfg->mutex); throw std::runtime_error(std::string(__func__) + " not implemented");
cfg->gamma = settings->gamma;
return 0;
} }
} }