Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion core/libs/prx/libSceVideoOut/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,27 @@ configure_windows_unwind(libSceVideoOut)
foreach(runtimeLinkFlag IN ITEMS -static-libgcc -static-libstdc++ -static)
string(REPLACE "${runtimeLinkFlag}" "" CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS}")
endforeach()
add_test_executable(video_out_flip_tests EXCLUDE_FROM_ALL tests/Flip.cpp)
if(BUILD_TESTING)
add_test_executable(video_out_flip_tests tests/Flip.cpp)
else()
add_test_executable(video_out_flip_tests EXCLUDE_FROM_ALL tests/Flip.cpp)
endif()
target_include_directories(video_out_flip_tests PRIVATE ${LIBS_INCLUDE_DIR} ${CMAKE_SOURCE_DIR}/3rdparty/SDL2/include)
target_link_libraries(video_out_flip_tests PRIVATE libSceVideoOut libSceAgcDriver libkernel libc)
set_target_properties(video_out_flip_tests PROPERTIES CXX_EXTENSIONS OFF)
configure_windows_unwind(video_out_flip_tests)

if(BUILD_TESTING)
add_test(NAME video_out_flip_lifetime COMMAND video_out_flip_tests)
add_test(NAME video_out_flip_decode COMMAND video_out_flip_tests decode)
add_test(NAME video_out_flip_controls COMMAND video_out_flip_tests controls)
set_tests_properties(video_out_flip_lifetime video_out_flip_decode video_out_flip_controls PROPERTIES TIMEOUT 20)
if(WIN32)
set_tests_properties(video_out_flip_lifetime video_out_flip_decode video_out_flip_controls PROPERTIES ENVIRONMENT_MODIFICATION
"PATH=path_list_prepend:$<TARGET_FILE_DIR:libc>")
endif()
endif()

if(BUILD_TESTING)
add_test_executable(pad_sdl_tests tests/PadSdl.cpp)
target_link_libraries(pad_sdl_tests PRIVATE SDL2-static)
Expand Down
7 changes: 6 additions & 1 deletion core/libs/prx/libSceVideoOut/src/VideoOutDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,12 @@ void VideoOutDriver::presentLoop(std::stop_token token) {
cancelled.swap(flipQueue->requests);
}
}
AgcDriverShutdown_nid_postfix();
try {
AgcDriverShutdown_nid_postfix();
} catch (...) {
std::lock_guard lock(flipQueue->mutex);
if (!flipQueue->failure) flipQueue->failure = std::current_exception();
}
window.Destroy();
}

Expand Down