MCPcopy Create free account
hub / github.com/ddnet/ddnet / ShowMessageBox

Method ShowMessageBox

src/engine/client/backend_sdl.cpp:886–901  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

884}
885
886std::optional<int> CGraphicsBackend_SDL_GL::ShowMessageBox(const IGraphics::CMessageBox &MessageBox)
887{
888 if(m_pProcessor != nullptr)
889 {
890 m_pProcessor->ErroneousCleanup();
891 }
892 // TODO: Remove this workaround when https://github.com/libsdl-org/SDL/issues/3750 is
893 // fixed and pass the window to SDL_ShowSimpleMessageBox to make the popup modal instead
894 // of destroying the window before opening the popup.
895 if(m_pWindow != nullptr)
896 {
897 SDL_DestroyWindow(m_pWindow);
898 m_pWindow = nullptr;
899 }
900 return ShowMessageBoxImpl(MessageBox, m_pWindow);
901}
902
903bool CGraphicsBackend_SDL_GL::IsModernAPI(EBackendType BackendType)
904{

Callers

nothing calls this directly

Calls 2

ShowMessageBoxImplFunction · 0.85
ErroneousCleanupMethod · 0.45

Tested by

no test coverage detected