diff --git a/source/audio.cpp b/source/audio.cpp index 5548ee2..42cbb15 100755 --- a/source/audio.cpp +++ b/source/audio.cpp @@ -153,7 +153,7 @@ bool Audio::onGetData(sf::SoundStream::Chunk &data) { } if(max_diff > greatest_diff) greatest_diff = max_diff; - printf("Current diff: %d - Greatest measured diff: %d\n", max_diff, greatest_diff); + ActualConsoleOutText("Current diff: " + std::to_string(max_diff) + " - Greatest measured diff: " + std::to_string(greatest_diff)); #endif // Basically, look into how low the time between calls of the function is diff --git a/source/frontend.cpp b/source/frontend.cpp index b18703a..1172442 100755 --- a/source/frontend.cpp +++ b/source/frontend.cpp @@ -4,6 +4,8 @@ #include #include +#define DEBUG_PRINT_CONTROLLER_INFO + const CropData default_3ds_crop = { .top_width = TOP_WIDTH_3DS, .top_height = HEIGHT_3DS, .top_x = 0, .top_y = 0, @@ -921,9 +923,26 @@ std::string save_screen_info(std::string base, const ScreenInfo &info) { } void joystick_axis_poll(std::queue &events_queue) { + #ifdef DEBUG_PRINT_CONTROLLER_INFO + static bool printed_once = false; + bool has_already_printed_once = printed_once; + #endif + for(unsigned int i = 0; i < sf::Joystick::Count; i++) { if(!sf::Joystick::isConnected(i)) continue; + + #ifdef DEBUG_PRINT_CONTROLLER_INFO + if(!has_already_printed_once) { + printed_once = true; + ActualConsoleOutText("Controller " + std::to_string(i + 1) + ":"); + sf::Joystick::Identification joy_details = sf::Joystick::getIdentification(i); + ActualConsoleOutText("\tName: " + joy_details.name); + ActualConsoleOutText("\tVID: " + std::to_string(joy_details.vendorId)); + ActualConsoleOutText("\tPID: " + std::to_string(joy_details.vendorId)); + } + #endif + for(unsigned int j = 0; j < sf::Joystick::AxisCount; j++) { sf::Joystick::Axis axis = sf::Joystick::Axis((unsigned int)sf::Joystick::Axis::X + j); if(sf::Joystick::hasAxis(i, axis))