| 135 | } |
| 136 | |
| 137 | static void |
| 138 | PrintText(char *eventtype, char *text) |
| 139 | { |
| 140 | char *spot, expanded[1024]; |
| 141 | |
| 142 | expanded[0] = '\0'; |
| 143 | for ( spot = text; *spot; ++spot ) |
| 144 | { |
| 145 | size_t length = SDL_strlen(expanded); |
| 146 | SDL_snprintf(expanded + length, sizeof(expanded) - length, "\\x%.2x", (unsigned char)*spot); |
| 147 | } |
| 148 | SDL_Log("%s Text (%s): \"%s%s\"\n", eventtype, expanded, *text == '"' ? "\\" : "", text); |
| 149 | } |
| 150 | |
| 151 | void |
| 152 | loop() |
no test coverage detected