Skip to content

Commit

Permalink
Fixed window F3/F4 keys.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjaraujo committed Dec 24, 2023
1 parent af79b2b commit 55ed785
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 26 deletions.
2 changes: 1 addition & 1 deletion trunk/src/Bombermaaan.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define APP_VERSION_INFO "2.2.5.2249"
#define APP_VERSION_INFO "2.2.5.2263"
8 changes: 4 additions & 4 deletions trunk/src/Bombermaaan.rc
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ END
// http://msdn.microsoft.com/en-us/library/aa381058%28VS.85%29.aspx
// http://msdn.microsoft.com/en-us/library/aa381049(VS.85).aspx
1 VERSIONINFO
FILEVERSION 2,2,5,2249
PRODUCTVERSION 2,2,5,2249
FILEVERSION 2,2,5,2263
PRODUCTVERSION 2,2,5,2263
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN
Expand All @@ -74,13 +74,13 @@ BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", "http://bombermaaan.sourceforge.net/\0"
VALUE "FileVersion", "2.2.5.2249"
VALUE "FileVersion", "2.2.5.2263"
VALUE "FileDescription", "Bombermaaan executable file"
VALUE "InternalName", "Bombermaaan.exe"
VALUE "LegalCopyright", "Copyright (C) 2000-2002, 2007, 2008 Thibaut Tollemer, Bernd Arnold, Jerome Bigot, Markus Drescher"
VALUE "OriginalFilename", "Bombermaaan.exe\0"
VALUE "ProductName", "Bombermaaan\0"
VALUE "ProductVersion", "2.2.5.2249"
VALUE "ProductVersion", "2.2.5.2263"
VALUE "Comments", "Bombermaaan is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>."
END
END
Expand Down
5 changes: 2 additions & 3 deletions trunk/src/CGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ bool CGame::Create(char** pCommandLine, int pCommandLineCount)
// __argv[0] is the full path including the exe file name
// If we append a "\.." to the full path, we get the location where the dll and exe file(s) are placed
pgmFolder.append(__argv[0]);
pgmFolder.append("\\..");
pgmFolder = pgmFolder.substr(0, pgmFolder.find_last_of("\\/"));
SetCurrentDirectory(pgmFolder.c_str());
#else
// determine level path by resolving the symlink /proc/self/exe
Expand Down Expand Up @@ -447,7 +447,7 @@ bool CGame::Create(char** pCommandLine, int pCommandLineCount)
#endif

#ifdef SDL
if ((SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) == -1))
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_JOYSTICK) == -1)
{
theLog.WriteLine("Game => !!! Could not initialise SDL library");
theLog.LogLastError();
Expand Down Expand Up @@ -1131,7 +1131,6 @@ void CGame::OnKeyUp(WPARAM wParam, LPARAM lParam)
}
else
{

//! Quickly exit the game with Ctrl + F12
if (wParam == VK_F12)
{
Expand Down
4 changes: 1 addition & 3 deletions trunk/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,7 @@ else()
add_executable(Bombermaaan ${BOMBERMAAAN_HEADERS} ${BOMBERMAAAN_SOURCES} ${WINREPLACE_HEADERS} ${WINREPLACE_SOURCES})
endif()

target_link_libraries(Bombermaaan
${BOMBERMAAAN_LIBRARIES}
)
target_link_libraries(Bombermaaan PRIVATE ${BOMBERMAAAN_LIBRARIES})

find_package(PythonInterp)

Expand Down
20 changes: 5 additions & 15 deletions trunk/src/CVideoSDL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,13 @@ bool CVideoSDL::Create(int Width, int Height, int Depth, bool FullScreen)
m_pPrimary = nullptr;
m_ColorKey = 0;

if (m_pWindow)
SDL_DestroyWindow(m_pWindow);

m_pWindow = SDL_CreateWindow("Bombermaaan",
SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED,
m_Width, m_Height,
FullScreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
m_Width, m_Height, FullScreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);

if (m_pWindow == NULL)
{
Expand Down Expand Up @@ -910,19 +912,7 @@ void CVideoSDL::UpdateAll()

bool CVideoSDL::IsModeAvailable(int Width, int Height, int Depth)
{
// Scan all available display modes
for (unsigned int i = 0; i < m_AvailableDisplayModes.size(); i++)
{
// If this is the display mode we are looking for
if (m_AvailableDisplayModes[i].Width == Width && m_AvailableDisplayModes[i].Height == Height && m_AvailableDisplayModes[i].Depth == Depth)
{
// Then it's available
return true;
}
}

// The display mode was not found so it's not available
return false;
return true;
}

//******************************************************************************************************************************
Expand Down

0 comments on commit 55ed785

Please sign in to comment.