He posat punteros dobles i tampoc va res

This commit is contained in:
2025-03-05 12:31:54 +01:00
parent 33038e8509
commit d41b0cb31c
11 changed files with 151 additions and 144 deletions

View File

@@ -241,20 +241,20 @@ void Notifier::show(std::vector<std::string> texts, NotificationText text_is, in
// Dibuja el fondo de la notificación
SDL_Rect rect;
auto surface = Screen::get()->getRenderSurfaceData();
auto surface_data = *(Screen::get()->getRenderSurfaceData());
if (shape == NotificationShape::ROUNDED)
{
rect = {4, 0, width - (4 * 2), height};
n.surface->fillRect(surface, &rect, bg_color_);
n.surface->fillRect(surface_data, &rect, bg_color_);
rect = {4 / 2, 1, width - 4, height - 2};
n.surface->fillRect(surface, &rect, bg_color_);
n.surface->fillRect(surface_data, &rect, bg_color_);
rect = {1, 4 / 2, width - 2, height - 4};
n.surface->fillRect(surface, &rect, bg_color_);
n.surface->fillRect(surface_data, &rect, bg_color_);
rect = {0, 4, width, height - (4 * 2)};
n.surface->fillRect(surface, &rect, bg_color_);
n.surface->fillRect(surface_data, &rect, bg_color_);
}
else if (shape == NotificationShape::SQUARED)