mirror of https://github.com/minetest/minetest.git
commit
c99cc55e31
20
src/main.cpp
20
src/main.cpp
|
@ -280,27 +280,17 @@ public:
|
||||||
right_active = event.MouseInput.isRightPressed();
|
right_active = event.MouseInput.isRightPressed();
|
||||||
|
|
||||||
if(event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN)
|
if(event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN)
|
||||||
{
|
|
||||||
leftclicked = true;
|
leftclicked = true;
|
||||||
}
|
|
||||||
if(event.MouseInput.Event == EMIE_RMOUSE_PRESSED_DOWN)
|
if(event.MouseInput.Event == EMIE_RMOUSE_PRESSED_DOWN)
|
||||||
{
|
|
||||||
rightclicked = true;
|
rightclicked = true;
|
||||||
}
|
|
||||||
if(event.MouseInput.Event == EMIE_LMOUSE_LEFT_UP)
|
if(event.MouseInput.Event == EMIE_LMOUSE_LEFT_UP)
|
||||||
{
|
|
||||||
leftreleased = true;
|
leftreleased = true;
|
||||||
}
|
|
||||||
if(event.MouseInput.Event == EMIE_RMOUSE_LEFT_UP)
|
if(event.MouseInput.Event == EMIE_RMOUSE_LEFT_UP)
|
||||||
{
|
|
||||||
rightreleased = true;
|
rightreleased = true;
|
||||||
}
|
|
||||||
if(event.MouseInput.Event == EMIE_MOUSE_WHEEL)
|
if(event.MouseInput.Event == EMIE_MOUSE_WHEEL)
|
||||||
{
|
|
||||||
mouse_wheel += event.MouseInput.Wheel;
|
mouse_wheel += event.MouseInput.Wheel;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -646,9 +636,8 @@ void SpeedTests()
|
||||||
tempstring = "";
|
tempstring = "";
|
||||||
tempstring2 = "";
|
tempstring2 = "";
|
||||||
const u32 ii = 10;
|
const u32 ii = 10;
|
||||||
for(u32 i=0; i<ii; i++){
|
for(u32 i=0; i<ii; i++)
|
||||||
tempstring2 += "asd";
|
tempstring2 += "asd";
|
||||||
}
|
|
||||||
for(u32 i=0; i<ii+1; i++){
|
for(u32 i=0; i<ii+1; i++){
|
||||||
tempstring += "asd";
|
tempstring += "asd";
|
||||||
if(tempstring == tempstring2)
|
if(tempstring == tempstring2)
|
||||||
|
@ -693,11 +682,10 @@ void SpeedTests()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for(s16 y=ii-1; y>=0; y--){
|
for(s16 y=ii-1; y>=0; y--){
|
||||||
for(s16 x=0; x<ii; x++){
|
for(s16 x=0; x<ii; x++)
|
||||||
tempf = map1[v2s16(x,y)];
|
tempf = map1[v2s16(x,y)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
infostream<<"Around 5000/ms should do well here."<<std::endl;
|
infostream<<"Around 5000/ms should do well here."<<std::endl;
|
||||||
|
@ -818,9 +806,7 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
std::ostringstream os1(std::ios::binary);
|
std::ostringstream os1(std::ios::binary);
|
||||||
os1<<" --"<<i->first;
|
os1<<" --"<<i->first;
|
||||||
if(i->second.type == VALUETYPE_FLAG)
|
if(!(i->second.type == VALUETYPE_FLAG))
|
||||||
{}
|
|
||||||
else
|
|
||||||
os1<<_(" <value>");
|
os1<<_(" <value>");
|
||||||
dstream<<padStringRight(os1.str(), 24);
|
dstream<<padStringRight(os1.str(), 24);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue