Forgot std::endl flush for logging on web build. Add deterministic keycode sum comparisons to keep proper ordering of input groups. Release Build 9665.
This commit is contained in:
parent
9dcfa55407
commit
5f77321d3d
@ -97,7 +97,7 @@ inline std::ofstream debugLogger;
|
|||||||
class Error{
|
class Error{
|
||||||
public:
|
public:
|
||||||
inline static void log(std::stringstream&str,std::source_location loc){
|
inline static void log(std::stringstream&str,std::source_location loc){
|
||||||
std::cout<<loc.file_name()<<"("<<loc.line()<<":"<<loc.column()<<") "<<loc.function_name()<<": "<<str.str();
|
std::cout<<loc.file_name()<<"("<<loc.line()<<":"<<loc.column()<<") "<<loc.function_name()<<": "<<str.str()<<std::endl;
|
||||||
#ifdef __DEBUG__
|
#ifdef __DEBUG__
|
||||||
throw;
|
throw;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1143,11 +1143,11 @@ void Input::StopVibration(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
const bool operator<(const InputGroup&group1,const InputGroup&group2){
|
const bool operator<(const InputGroup&group1,const InputGroup&group2){
|
||||||
return &group1<&group2;
|
return group1.GetKeyCodeSum()<group2.GetKeyCodeSum();
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool operator<(const InputEngageGroup&group1,const InputEngageGroup&group2){
|
const bool operator<(const InputEngageGroup&group1,const InputEngageGroup&group2){
|
||||||
return &group1<&group2;
|
return group1.GetGroup().GetKeyCodeSum()<group2.GetGroup().GetKeyCodeSum();
|
||||||
}
|
}
|
||||||
|
|
||||||
const InputType Input::GetType()const{
|
const InputType Input::GetType()const{
|
||||||
@ -1262,3 +1262,7 @@ void Input::SetLightbar(const Pixel col){
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const int InputGroup::GetKeyCodeSum()const{
|
||||||
|
return std::accumulate(keys.begin(),keys.end(),0,[](int val,const Input&input){return val+int(input.GetType())*1000+input.GetKeyCode();});
|
||||||
|
}
|
@ -179,12 +179,14 @@ public:
|
|||||||
const float Analog()const;
|
const float Analog()const;
|
||||||
const float AnalogDAS(const float threshold=0.2f);
|
const float AnalogDAS(const float threshold=0.2f);
|
||||||
void ClearAllKeybinds();
|
void ClearAllKeybinds();
|
||||||
|
const int GetKeyCodeSum()const;
|
||||||
std::string GetDisplayName();
|
std::string GetDisplayName();
|
||||||
//Draws an input display with accompanying text centered at given position.
|
//Draws an input display with accompanying text centered at given position.
|
||||||
void DrawPrimaryInput(const std::variant<AiL*const,TileTransformedView*const,ViewPort*const>renderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha)const;
|
void DrawPrimaryInput(const std::variant<AiL*const,TileTransformedView*const,ViewPort*const>renderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha)const;
|
||||||
void DrawPrimaryInput(const std::variant<AiL*const,TileTransformedView*const,ViewPort*const>renderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha,const InputType type,vf2d textScale={1.f,1.f})const;
|
void DrawPrimaryInput(const std::variant<AiL*const,TileTransformedView*const,ViewPort*const>renderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha,const InputType type,vf2d textScale={1.f,1.f})const;
|
||||||
void DrawInput(const std::variant<AiL*const,TileTransformedView*const,ViewPort*const>renderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha,const InputType type,vf2d textScale={1.f,1.f},const std::string_view preDisplayText="")const;
|
void DrawInput(const std::variant<AiL*const,TileTransformedView*const,ViewPort*const>renderer,const vf2d pos,const std::string_view displayText,const uint8_t alpha,const InputType type,vf2d textScale={1.f,1.f},const std::string_view preDisplayText="")const;
|
||||||
const std::optional<Input>GetPrimaryKey(InputType type)const;
|
const std::optional<Input>GetPrimaryKey(InputType type)const;
|
||||||
|
friend const bool operator<(const InputGroup&group1,const InputGroup&group2);
|
||||||
};
|
};
|
||||||
|
|
||||||
class InputEngageGroup{
|
class InputEngageGroup{
|
||||||
@ -208,6 +210,7 @@ public:
|
|||||||
InputGroup&GetGroup()const;
|
InputGroup&GetGroup()const;
|
||||||
const InputEngageGroup operator=(const InputEngageGroup&rhs);
|
const InputEngageGroup operator=(const InputEngageGroup&rhs);
|
||||||
const bool GetLabelVisible()const;
|
const bool GetLabelVisible()const;
|
||||||
|
friend const bool operator<(const InputEngageGroup&group1,const InputEngageGroup&group2);
|
||||||
};
|
};
|
||||||
|
|
||||||
class GenericKey{
|
class GenericKey{
|
||||||
@ -226,7 +229,5 @@ public:
|
|||||||
static void Update();
|
static void Update();
|
||||||
};
|
};
|
||||||
|
|
||||||
const bool operator<(const InputGroup&group1,const InputGroup&group2);
|
|
||||||
const bool operator<(const InputEngageGroup&group1,const InputEngageGroup&group2);
|
|
||||||
|
|
||||||
using enum InputEngageGroup::EngageType;
|
using enum InputEngageGroup::EngageType;
|
@ -39,7 +39,7 @@ All rights reserved.
|
|||||||
#define VERSION_MAJOR 1
|
#define VERSION_MAJOR 1
|
||||||
#define VERSION_MINOR 2
|
#define VERSION_MINOR 2
|
||||||
#define VERSION_PATCH 3
|
#define VERSION_PATCH 3
|
||||||
#define VERSION_BUILD 9660
|
#define VERSION_BUILD 9665
|
||||||
|
|
||||||
#define stringify(a) stringify_(a)
|
#define stringify(a) stringify_(a)
|
||||||
#define stringify_(a) #a
|
#define stringify_(a) #a
|
||||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user