Skip to content

Commit

Permalink
0.3a-3d64a8d
Browse files Browse the repository at this point in the history
  • Loading branch information
DirtBagXon committed Sep 10, 2024
1 parent 67e3e8a commit 02385dd
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Config/Supermodel.ini
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ PortOut = 1971
AddressOut = "127.0.0.1"

; Common
InputUIExit = "KEY_ESCAPE,JOY1_BUTTON10+JOY1_BUTTON9"
InputUIExit = "JOY1_BUTTON10+JOY1_BUTTON9"
InputStart1 = "KEY_1,JOY1_BUTTON9"
InputStart2 = "KEY_2,JOY2_BUTTON9"
InputCoin1 = "KEY_3,JOY1_BUTTON10"
Expand Down
2 changes: 1 addition & 1 deletion Src/Graphics/New3D/R3DFrameBuffers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ void R3DFrameBuffers::AllocShaderBase()
)glsl";

m_shaderBase.LoadShaders(vertexShader, fragmentShader);
m_shaderBase.uniformLoc[0] = m_shaderTrans.GetUniformLocation("tex1");
m_shaderBase.uniformLoc[0] = m_shaderBase.GetUniformLocation("tex1");
}

void R3DFrameBuffers::AllocShaderTrans()
Expand Down
7 changes: 5 additions & 2 deletions Src/Inputs/Input.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,10 @@ void CInput::LoadFromConfig(const Util::Config::Node &config)
{
// If found, then set mapping string
mapping = node->ValueAs<std::string>();
SetMapping(mapping.c_str());
if (strcmp(id, "UIExit") == 0)
AppendMapping(mapping.c_str());
else
SetMapping(mapping.c_str());
return;
}
}
Expand Down Expand Up @@ -210,4 +213,4 @@ bool CInput::SendForceFeedbackCmd(ForceFeedbackCmd ffCmd)
if (m_source == NULL)
return false;
return m_source->SendForceFeedbackCmd(ffCmd);
}
}
3 changes: 2 additions & 1 deletion Src/Inputs/Input.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#ifndef INCLUDED_INPUT_H
#define INCLUDED_INPUT_H

#include <cstring>
#include "InputSource.h"
#include "Types.h"
#include "Game.h"
Expand Down Expand Up @@ -211,7 +212,7 @@ inline bool CInput::IsUIInput()
inline bool CInput::IsConfigurable()
{
// All inputs except UI and virtual ones can be configured by the user
return (gameFlags != Game::INPUT_UI) && !(flags & INPUT_FLAGS_VIRTUAL);
return ((strcmp(id, "UIExit") == 0) || ((gameFlags != Game::INPUT_UI) && !(flags & INPUT_FLAGS_VIRTUAL)));
}

inline bool CInput::IsVirtual()
Expand Down
6 changes: 6 additions & 0 deletions Src/Inputs/Inputs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -722,6 +722,12 @@ void CInputs::PrintInputs(const Game *game)
const char *groupLabel = NULL;
for (vector<CInput*>::iterator it = m_inputs.begin(); it != m_inputs.end(); ++it)
{
if (strcmp((*it)->id, "UIExit") == 0)
{
printf("Exit Assignment:\n");
printf(" %s = %s\n", (*it)->label, (*it)->GetMapping());
}

if (!(*it)->IsConfigurable() || !((*it)->gameFlags & gameFlags))
continue;

Expand Down
2 changes: 1 addition & 1 deletion Src/Version.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#define INCLUDED_VERSION_H

#ifndef SUPERMODEL_VERSION
#define SUPERMODEL_VERSION "0.3a-706969a-mm DirtBagXon (Sinden)"
#define SUPERMODEL_VERSION "0.3a-3d64a8d-mm DirtBagXon (Sinden)"
#endif

#endif // INCLUDED_VERSION_H

0 comments on commit 02385dd

Please sign in to comment.