[Scummvm-git-logs] scummvm master -> e6136b4ceb64f3631c8469aa5d7fe14c7af9c0ed
dreammaster
dreammaster at scummvm.org
Mon Feb 8 03:05:21 UTC 2021
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
a2a889c858 AGS: Allow exiting ScummVM when dialog is active
e6136b4ceb AGS: Fix loading TTF fonts
Commit: a2a889c858001634039d3111e7a0d3042918f346
https://github.com/scummvm/scummvm/commit/a2a889c858001634039d3111e7a0d3042918f346
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-02-07T18:43:02-08:00
Commit Message:
AGS: Allow exiting ScummVM when dialog is active
Changed paths:
engines/ags/engine/ac/display.cpp
diff --git a/engines/ags/engine/ac/display.cpp b/engines/ags/engine/ac/display.cpp
index 9a21e70eae..9726ad63e3 100644
--- a/engines/ags/engine/ac/display.cpp
+++ b/engines/ags/engine/ac/display.cpp
@@ -54,6 +54,7 @@
#include "ags/engine/ac/mouse.h"
#include "ags/engine/media/audio/audio_system.h"
#include "ags/engine/ac/timer.h"
+#include "ags/ags.h"
namespace AGS3 {
@@ -269,7 +270,10 @@ int _display_main(int xx, int yy, int wii, const char *text, int disp_type, int
int countdown = GetTextDisplayTime(todis);
int skip_setting = user_to_internal_skip_speech((SkipSpeechStyle)play.skip_display);
// Loop until skipped
- while (true) {
+ for (;;) {
+ if (SHOULD_QUIT)
+ return 0;
+
update_audio_system_on_game_loop();
render_graphics();
int mbut, mwheelz;
Commit: e6136b4ceb64f3631c8469aa5d7fe14c7af9c0ed
https://github.com/scummvm/scummvm/commit/e6136b4ceb64f3631c8469aa5d7fe14c7af9c0ed
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2021-02-07T19:05:07-08:00
Commit Message:
AGS: Fix loading TTF fonts
Changed paths:
engines/ags/lib/alfont/alfont.h
engines/ags/shared/font/ttffontrenderer.cpp
diff --git a/engines/ags/lib/alfont/alfont.h b/engines/ags/lib/alfont/alfont.h
index 5cf57a407c..2e7b053c61 100644
--- a/engines/ags/lib/alfont/alfont.h
+++ b/engines/ags/lib/alfont/alfont.h
@@ -36,7 +36,7 @@ struct ALFONT_FONT {
Common::HashMap<int, Graphics::Font *> _fonts;
ALFONT_FONT() : _size(-1), _ttfData(nullptr, 0) {}
- ALFONT_FONT(const byte *data, size_t size) : _size(-1), _ttfData(data, size, DisposeAfterUse::YES) {}
+ ALFONT_FONT(const byte *data, int size) : _size(-1), _ttfData(data, size, DisposeAfterUse::YES) {}
~ALFONT_FONT() {
for (Common::HashMap<int, Graphics::Font *>::iterator it = _fonts.begin();
diff --git a/engines/ags/shared/font/ttffontrenderer.cpp b/engines/ags/shared/font/ttffontrenderer.cpp
index bf675a62f8..b19b413f76 100644
--- a/engines/ags/shared/font/ttffontrenderer.cpp
+++ b/engines/ags/shared/font/ttffontrenderer.cpp
@@ -105,10 +105,11 @@ bool TTFFontRenderer::LoadFromDiskEx(int fontNumber, int fontSize, const FontRen
delete reader;
ALFONT_FONT *alfptr = alfont_load_font_from_mem(membuffer, lenof);
- free(membuffer);
- if (alfptr == nullptr)
+ if (alfptr == nullptr) {
+ free(membuffer);
return false;
+ }
// TODO: move this somewhere, should not be right here
#if AGS_OUTLINE_FONT_FIX
More information about the Scummvm-git-logs
mailing list