AGS: Engine: print which gfx driver is set to the log

Partially from upstream f58f9634422ae28f54d1fd9dc6112c62ad283597
This commit is contained in:
Walter Agazzi 2024-01-08 01:30:56 +01:00
parent 6f4b702810
commit b395603107
3 changed files with 8 additions and 4 deletions

View File

@ -160,12 +160,13 @@ public:
ScummVMRendererGraphicsDriver();
~ScummVMRendererGraphicsDriver() override;
const char *GetDriverName() override {
return "SDL 2D Software renderer";
}
const char *GetDriverID() override {
return "Software";
}
const char *GetDriverName() override {
return "SDL 2D Software renderer";
}
void SetTintMethod(TintMethod /*method*/) override;
bool SetDisplayMode(const DisplayMode &mode) override;
void UpdateDeviceScreen(const Size &screen_sz) override;

View File

@ -97,8 +97,10 @@ typedef void (*GFXDRV_CLIENTCALLBACKINITGFX)(void *data);
class IGraphicsDriver {
public:
virtual const char *GetDriverName() = 0;
// Gets graphic driver's identifier
virtual const char *GetDriverID() = 0;
// Gets graphic driver's "friendly name"
virtual const char *GetDriverName() = 0;
virtual void SetTintMethod(TintMethod method) = 0;
// Initialize given display mode
virtual bool SetDisplayMode(const DisplayMode &mode) = 0;

View File

@ -470,6 +470,7 @@ bool graphics_mode_set_dm(const DisplayMode &dm) {
_GP(SavedWindowedSetting).Dm = rdm;
else
_GP(SavedFullscreenSetting).Dm = rdm;
Debug::Printf(kDbgMsg_Info, "Graphics driver set: %s", _G(gfxDriver)->GetDriverName());
Debug::Printf(kDbgMsg_Info, "Graphics mode set: %d x %d (%d-bit) %s",
rdm.Width, rdm.Height, rdm.ColorDepth,
rdm.IsWindowed() ? "windowed" : (rdm.IsRealFullscreen() ? "fullscreen" : "fullscreen desktop"));