Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2
chromium-bsu
chromium-bsu-0.9.15.1-gcc6.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File chromium-bsu-0.9.15.1-gcc6.patch of Package chromium-bsu
Index: b/src/MainSDL_Event.cpp =================================================================== --- a/src/MainSDL_Event.cpp +++ b/src/MainSDL_Event.cpp @@ -19,6 +19,7 @@ #include <cstdlib> #include <cstdio> #include <cstring> +#include <cmath> #include "Config.h" @@ -417,14 +418,14 @@ void MainSDL::keyMove() #else Uint8 *keystate = SDL_GetKeyState(NULL); #endif - if( keystate[SDLK_LEFT] || keystate[SDLK_KP4] ) key_speed_x -= 2.0 + abs(key_speed_x)*0.4; - if( keystate[SDLK_RIGHT] || keystate[SDLK_KP6] ) key_speed_x += 2.0 + abs(key_speed_x)*0.4; - if( keystate[SDLK_UP] || keystate[SDLK_KP8] ) key_speed_y -= 2.0 + abs(key_speed_y)*0.4; - if( keystate[SDLK_DOWN] || keystate[SDLK_KP2] ) key_speed_y += 2.0 + abs(key_speed_y)*0.4; - if( keystate[SDLK_KP7] ){ key_speed_x -= 2.0 + abs(key_speed_x)*0.4; key_speed_y -= 2.0 + abs(key_speed_y)*0.4; } - if( keystate[SDLK_KP9] ){ key_speed_x += 2.0 + abs(key_speed_x)*0.4; key_speed_y -= 2.0 + abs(key_speed_y)*0.4; } - if( keystate[SDLK_KP3] ){ key_speed_x += 2.0 + abs(key_speed_x)*0.4; key_speed_y += 2.0 + abs(key_speed_y)*0.4; } - if( keystate[SDLK_KP1] ){ key_speed_x -= 2.0 + abs(key_speed_x)*0.4; key_speed_y += 2.0 + abs(key_speed_y)*0.4; } + if( keystate[SDLK_LEFT] || keystate[SDLK_KP4] ) key_speed_x -= 2.0 + std::abs(key_speed_x)*0.4; + if( keystate[SDLK_RIGHT] || keystate[SDLK_KP6] ) key_speed_x += 2.0 + std::abs(key_speed_x)*0.4; + if( keystate[SDLK_UP] || keystate[SDLK_KP8] ) key_speed_y -= 2.0 + std::abs(key_speed_y)*0.4; + if( keystate[SDLK_DOWN] || keystate[SDLK_KP2] ) key_speed_y += 2.0 + std::abs(key_speed_y)*0.4; + if( keystate[SDLK_KP7] ){ key_speed_x -= 2.0 + std::abs(key_speed_x)*0.4; key_speed_y -= 2.0 + std::abs(key_speed_y)*0.4; } + if( keystate[SDLK_KP9] ){ key_speed_x += 2.0 + std::abs(key_speed_x)*0.4; key_speed_y -= 2.0 + std::abs(key_speed_y)*0.4; } + if( keystate[SDLK_KP3] ){ key_speed_x += 2.0 + std::abs(key_speed_x)*0.4; key_speed_y += 2.0 + std::abs(key_speed_y)*0.4; } + if( keystate[SDLK_KP1] ){ key_speed_x -= 2.0 + std::abs(key_speed_x)*0.4; key_speed_y += 2.0 + std::abs(key_speed_y)*0.4; } //float s = (1.0-game->speedAdj)+(game->speedAdj*0.7); float s = 0.7; key_speed_x *= s;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor