This commit is contained in:
Krzosa Karol
2024-07-27 14:10:38 +02:00
parent 9955181b0d
commit 0ebe63eff3
4 changed files with 6 additions and 3 deletions

View File

@@ -371,7 +371,7 @@ void ReloadFont(int32_t size) {
}
Scratch scratch;
Atlas atlas = CreateAtlas(scratch, {1024, 1024});
Atlas atlas = CreateAtlas(scratch, {2048, 2048});
MainFont = CreateFont(&atlas, size, FontPath);
{
glCreateTextures(GL_TEXTURE_2D, 1, &atlas.texture_id);

View File

@@ -328,8 +328,10 @@ bool GlobalCommand(Event event) {
if (Ctrl(SDLK_MINUS)) {
ReloadFont((int32_t)MainFont.size - 1);
run_window_command = false;
} else if (Ctrl(SDLK_EQUALS)) {
ReloadFont((int32_t)MainFont.size + 1);
run_window_command = false;
}
return run_window_command;

View File

@@ -102,7 +102,7 @@ WindowID GetLastActiveWindow() {
return NullWindowID;
}
void SetActiveWindow(WindowID window) {
bool SetActiveWindow(WindowID window) {
if (window.id != ActiveWindow.id && LastFrameIDWhenSwitchedActiveWindow != FrameID) {
LastFrameIDWhenSwitchedActiveWindow = FrameID;
ActiveWindow = window;
@@ -110,7 +110,9 @@ void SetActiveWindow(WindowID window) {
if (!w->dont_save_in_active_window_history) {
Add(&WindowSwitchHistory, window);
}
return true;
}
return false;
}
Window *FindParentWindow(ViewID view_id) {

View File

@@ -268,7 +268,6 @@ int main()
SDL_DestroyWindow(window);
SDL_Quit();
EndProfileScope();
EndProfiler();
return 0;