Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

COMMON: removed USE_TTS check from engines #2987

Merged
merged 1 commit into from May 3, 2021
Merged

Conversation

@mgerhardy
Copy link
Contributor

@mgerhardy mgerhardy commented Apr 28, 2021

This removed the need for the engine authors to add scummvm compile time options checks into their engine code.
There are however still some places where I've left the check in the engine code - this is e.g. for UI options.

OSystem now just returns a nullptr if there is no text to speech manager instance (because none is compiled into the binary, or the system doesn't provide support for it).

OSystem now just returns a nullptr if there is no text to speech manager instance
(because none is compiled into the binary, or the system doesn't provide support
for it). This removed the need for the engine authors to add scummvm osystem compile
time options checks into their engine code
@bluegr
Copy link
Member

@bluegr bluegr commented May 3, 2021

Very nice. All the relevant code segments have null checks for textToSpeechManager, which is set in the different platforms (macosx.cpp, posix.cpp and win32.cpp).

I've gone through all the changes, and this certainly clears these checks and makes the TTS code much simpler and easier to use. The USE_TTS checks are indeed not needed for the engine code, and should only be left in the backend code that actually initializes the TTS manager.

Many thanks for your work! A straightforward change, which makes things easier for everyone.

Merging

@bluegr bluegr merged commit 9d82fa5 into scummvm:master May 3, 2021
3 checks passed
3 checks passed
@codacy-production
Codacy Static Code Analysis Codacy Static Code Analysis
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@deepcode-ci-bot
deepcode-ci-bot Well done, no issues found!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants