- revert to before adding I_SetWindowTitle to DFrameBuffer

This commit is contained in:
Rachael Alexanderson 2017-11-18 07:42:15 -05:00
parent 25ca640354
commit 0273b1a8cc
6 changed files with 10 additions and 22 deletions

View file

@ -128,6 +128,7 @@ void DrawHUD();
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
extern void I_SetWindowTitle(const char* caption);
extern void ReadStatistics();
extern void M_RestoreMode ();
extern void M_SetDefaultMode ();
@ -2744,7 +2745,7 @@ void D_DoomMain (void)
}
if (I_FriendlyWindowTitle)
screen->I_SetWindowTitle(DoomStartupInfo.Name.GetChars());
I_SetWindowTitle(DoomStartupInfo.Name.GetChars());
D_DoomLoop (); // this only returns if a 'restart' CCMD is given.
//
@ -2909,7 +2910,7 @@ DEFINE_FIELD_X(InputEventData, event_t, y)
CUSTOM_CVAR(Bool, I_FriendlyWindowTitle, true, CVAR_GLOBALCONFIG|CVAR_ARCHIVE|CVAR_NOINITCALL)
{
if (self)
screen->I_SetWindowTitle(DoomStartupInfo.Name.GetChars());
I_SetWindowTitle(DoomStartupInfo.Name.GetChars());
else
screen->I_SetWindowTitle(NULL);
I_SetWindowTitle(NULL);
}

View file

@ -1521,18 +1521,12 @@ void I_SetMainWindowVisible(bool visible)
}
// each platform has its own specific version of this function.
void CocoaVideo::I_SetWindowTitle(const char* title)
void I_SetWindowTitle(const char* title)
{
static NSString* TITLE_STRING;
static NSString* const TITLE_STRING;
if (title)
TITLE_STRING = [NSString stringWithFormat:@"%s", title];
else
TITLE_STRING = [NSString stringWithFormat:@"%s %s", GAMESIG, GetVersionString()];
[m_window setTitle:TITLE_STRING];
}
void DFrameBuffer::I_SetWindowTitle(const char* title)
{
if (Video != nullptr)
Video->I_SetWindowTitle(title);
}

View file

@ -553,9 +553,9 @@ ADD_STAT (blit)
}
// each platform has its own specific version of this function.
void SDLFB::I_SetWindowTitle(const char* caption)
void I_SetWindowTitle(const char* caption)
{
Screen = GetSDLWindow();
Screen = screen->GetSDLWindow();
if (caption)
SDL_SetWindowTitle(Screen, caption);
else
@ -565,6 +565,3 @@ void SDLFB::I_SetWindowTitle(const char* caption)
SDL_SetWindowTitle(Screen, default_caption);
}
}
void DFrameBuffer::I_SetWindowTitle(const char* caption)
{
}

View file

@ -30,9 +30,8 @@ public:
virtual void SetVSync(bool vsync);
virtual void ScaleCoordsFromWindow(int16_t &x, int16_t &y);
void I_SetWindowTitle(const char* caption);
SDL_Window *GetSDLWindow() override { return Screen; }
private:
PalEntry SourcePalette[256];
uint8_t GammaTable[3][256];
@ -58,5 +57,4 @@ private:
void ResetSDLRenderer();
SDLFB() {}
void I_SetWindowTitle();
};

View file

@ -444,8 +444,6 @@ public:
uint64_t GetLastFPS() const { return LastCount; }
virtual void I_SetWindowTitle(const char* caption);
#ifdef _WIN32
virtual void PaletteChanged () = 0;
virtual int QueryNewPalette () = 0;

View file

@ -1362,7 +1362,7 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE nothing, LPSTR cmdline, int n
}
// each platform has its own specific version of this function.
void DFrameBuffer::I_SetWindowTitle(const char* caption)
void I_SetWindowTitle(const char* caption)
{
if (caption)
SetWindowText(Window, (LPCTSTR)caption);