Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ void BL::Launcher::create_window()
window = SDL_CreateWindow(PROJECT_NAME,
dm->w,
dm->h,
SDL_WINDOW_FULLSCREEN | SDL_WINDOW_BORDERLESS
SDL_WINDOW_FULLSCREEN
);
if (!window)
BL::logger::critical("Could not create window (SDL Error: {})", SDL_GetError());
Expand Down
21 changes: 11 additions & 10 deletions src/menu_highlight.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <string>
#include <cmath>
#include <fmt/core.h>

#include "image.hpp"
Expand All @@ -22,18 +23,18 @@ void BL::MenuHighlight::render_surface(BL::SVGRasterizer &rasterizer, int w, int
int h_inner = h - 2*t;
int rx_outter = (int) std::round((float) w * MENU_HIGHLIGHT_RX);
int rx_inner = rx_outter / 2;

// Render highlight
SDL_Color mask_color = config.menu_highlight_color;
mask_color.b & 0x01 ? mask_color.b-- : mask_color.b++;
std::string format = format_menu_highlight(w,
h,
config.menu_highlight_color,
mask_color,
w_inner,
h_inner,
t,
rx_outter,
std::string format = format_menu_highlight(w,
h,
config.menu_highlight_color,
mask_color,
w_inner,
h_inner,
t,
rx_outter,
rx_inner
);
SDL_Surface *highlight = rasterizer.rasterize_svg(format, -1, -1);
Expand All @@ -56,7 +57,7 @@ void BL::MenuHighlight::render_surface(BL::SVGRasterizer &rasterizer, int w, int
SDL_Rect blit_rect = {
static_cast<int>(std::round(shadow_offset)),
static_cast<int>(std::round(shadow_offset)),
highlight->w,
highlight->w,
highlight->h
};
SDL_BlitSurface(highlight, nullptr, surface, &blit_rect);
Expand Down
3 changes: 2 additions & 1 deletion src/sidebar_highlight.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <string>
#include <cmath>
#include <fmt/core.h>

#include "sidebar_highlight.hpp"
Expand Down Expand Up @@ -44,4 +45,4 @@ void BL::SidebarHighlight::render_texture()
texture = renderer->create_texture(*surface);
BL::free_surface(surface);
surface = nullptr;
}
}
Loading