improve char showing
This commit is contained in:
parent
2ac8c05e1d
commit
86a805b6e9
@ -139,9 +139,9 @@ void Game::draw_guesses(SDL_Renderer *renderer) {
|
||||
|
||||
std::optional<char> current_char = guess_corrector->guessed().lock()[i];
|
||||
if (current_char) {
|
||||
const char *text_to_write = &*current_char;
|
||||
const char text_to_write[] = {*current_char, '\0'};
|
||||
|
||||
SDL_Surface *surface = TTF_RenderText_Solid(font, text_to_write, TEXT_COLOR);
|
||||
SDL_Surface *surface = TTF_RenderText_Blended(font, text_to_write, TEXT_COLOR);
|
||||
if (surface == nullptr) {
|
||||
std::cerr << "Failed to create surface: " << TTF_GetError() << std::endl;
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user