[Scummvm-git-logs] scummvm master -> 6eb9a48bbddf8912c149da2bbe58b343cbd8a6bc

bgK bastien.bouclet at gmail.com
Tue Nov 28 05:51:37 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
6eb9a48bbd EVENTS: Delay initializing the virtual keyboard


Commit: 6eb9a48bbddf8912c149da2bbe58b343cbd8a6bc
    https://github.com/scummvm/scummvm/commit/6eb9a48bbddf8912c149da2bbe58b343cbd8a6bc
Author: Bastien Bouclet (bastien.bouclet at gmail.com)
Date: 2017-11-28T05:49:45+01:00

Commit Message:
EVENTS: Delay initializing the virtual keyboard

The virtual keyboard requires the backend to be fully initialized
because it needs the display size.

Fixes #10338.

Changed paths:
    backends/events/default/default-events.cpp


diff --git a/backends/events/default/default-events.cpp b/backends/events/default/default-events.cpp
index 8dd9599..85cf44c 100644
--- a/backends/events/default/default-events.cpp
+++ b/backends/events/default/default-events.cpp
@@ -54,7 +54,7 @@ DefaultEventManager::DefaultEventManager(Common::EventSource *boss) :
 	_keyRepeatTime = 0;
 
 #ifdef ENABLE_VKEYBD
-	_vk = new Common::VirtualKeyboard();
+	_vk = nullptr;
 #endif
 #ifdef ENABLE_KEYMAPPER
 	_keymapper = new Common::Keymapper(this);
@@ -74,6 +74,8 @@ DefaultEventManager::~DefaultEventManager() {
 
 void DefaultEventManager::init() {
 #ifdef ENABLE_VKEYBD
+	_vk = new Common::VirtualKeyboard();
+
 	if (ConfMan.hasKey("vkeybd_pack_name")) {
 		_vk->loadKeyboardPack(ConfMan.get("vkeybd_pack_name"));
 	} else {
@@ -152,6 +154,9 @@ bool DefaultEventManager::pollEvent(Common::Event &event) {
 		break;
 #ifdef ENABLE_VKEYBD
 	case Common::EVENT_VIRTUAL_KEYBOARD:
+		if (!_vk)
+			break;
+
 		if (_vk->isDisplaying()) {
 			_vk->close(true);
 		} else {





More information about the Scummvm-git-logs mailing list