Skip to content

Commit

Permalink
mouse stuttering fix and a few other minor things
Browse files Browse the repository at this point in the history
  • Loading branch information
Northfear committed Aug 24, 2020
1 parent e036193 commit eb73e1e
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 21 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,3 @@ xcuserdata

**/gemrb_path.txt
**/GemRB.log
.vscode/settings.json
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,34 @@ Debug output can be previewed with psp2shell
https://github.com/Cpasjuste/psp2shell

## Port info
Keyboard input is not supported and there's no virtual keyboard in SDL1. To auto-fill desired character name during character creation, edit VitaCharName parameter in GemRB.cfg.

To input savegame names (it's impossible to save a game with blank name) just use TRIANGLE or SQUARE buttons.
### Input

Keyboard input is done with D-Pad (on character creation and game saves. 'a-z', '0-9' and 'space' are supported).

- Left - Remove character
- Right - Add new character
- Down - Next character (alphabetically)
- Up - Previous character
- R1, L1 - Switch current character between uppercase/lowercase

### Vita specific options

Pointer movement speed can be changed with 'VitaPointerSpeed' parameter in GemRB.cfg.

Performance with 640x480 resolution is "kinda playable". To improve it I STRONGLY recommend disabling character movement and attack sounds in game options. Disabling sound altogether (by seting "AudioDriver = none" in GemRB.cfg) can improve performance even further.
The game is pretty IO heavy for Vita, so loading can take some time.
Use "Fullscreen=1" to scale game area to native Vita resolution or "Fullscreen=0" to keep game area at the center of the screen.

VitaKeepAspectRatio=1 keeps aspect ratio of original image when scaling. VitaKeepAspectRatio=0 just scales it to 960x544.

VitaBilinear=1 uses bilinear filtering when scaling.

### Performance

Widescreen mod is supported, but performance with native resolution can be poor in areas with a lot of characters.

Custom portraits, character imports, voice selection during character creation are not supported right now (but you can copy saves from PC with all of these and they should work fine)
The game is pretty IO heavy. Loading can take quite some time. And a big number of sound effects playing at the same time can cause a lot of stuttering. To improve the situation I STRONGLY recommend disabling character movement and attack sounds in game options. Disabling sound altogether (by seting "AudioDriver = none" in GemRB.cfg) can improve it even further.

Port probably contains some bugs, since I haven't tested it that much.
"Bpp=16" option is recommended for better performance.

## Controls
- Left analog stick - Pointer movement
Expand All @@ -69,6 +85,7 @@ Port probably contains some bugs, since I haven't tested it that much.
- R1 - Pause
- L1 - Highlight items
- SELECT - Open menu
- START - Escape


# GemRB
Expand Down
3 changes: 0 additions & 3 deletions cmake/modules/FindSDL2_mixer.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,5 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2_mixer
set(SDL2MIXER_LIBRARY ${SDL2_MIXER_LIBRARIES})
set(SDL2MIXER_INCLUDE_DIR ${SDL2_MIXER_INCLUDE_DIRS})
set(SDL2MIXER_FOUND ${SDL2_MIXER_FOUND})
set(SDL_MIXER_LIBRARIES ${SDL2_MIXER_LIBRARIES})
set(SDL_MIXER_INCLUDE_DIR ${SDL2_MIXER_INCLUDE_DIRS})
set(SDL_MIXER_FOUND ${SDL2_MIXER_FOUND})

mark_as_advanced(SDL2_MIXER_LIBRARY SDL2_MIXER_INCLUDE_DIR)
6 changes: 3 additions & 3 deletions gemrb/GemRB.cfg.vita
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
VitaPointerSpeed = 10
VitaKeepAspectRatio = 1
VitaBilinear = 1
VitaPointerSpeed=10
VitaKeepAspectRatio=1
VitaBilinear=1

#####################################################
# #
Expand Down
8 changes: 8 additions & 0 deletions gemrb/core/System/Logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@
#include "exports.h"
#include "win32def.h"

#ifdef VITA
#if defined(__sgi)
# include <stdarg.h>
#else
# include <cstdarg>
#endif
#endif

namespace GemRB {

#ifdef WIN32
Expand Down
2 changes: 1 addition & 1 deletion gemrb/plugins/BIKPlayer/mem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void *av_malloc(unsigned int size)
ptr = NULL;
#elif HAVE_ALIGNED_MALLOC
ptr = _aligned_malloc(size, 16);
#elif defined(HAVE_MEMALIGN)
#elif HAVE_MEMALIGN
ptr = memalign(16, size);
#else
ptr = malloc(size + 16);
Expand Down
1 change: 0 additions & 1 deletion gemrb/plugins/GUIScript/GUIScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15997,7 +15997,6 @@ bool GUIScript::Init(void)
Py_NoSiteFlag = 1;
Py_IgnoreEnvironmentFlag = 1;
Py_NoUserSiteDirectory = 1;
Py_SetPythonHome((char*)"ux0:/data/GemRB/python2.7");
#endif

Py_Initialize();
Expand Down
12 changes: 6 additions & 6 deletions gemrb/plugins/SDLVideo/SDLVideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,10 @@ int SDLVideoDriver::SwapBuffers(void)
}
lastTime = time;

#ifdef VITA
ProcessAxisMotion();
#endif

if (Cursor[CursorIndex] && !(MouseFlags & (MOUSE_DISABLED | MOUSE_HIDDEN))) {

if (MouseFlags&MOUSE_GRAYED) {
Expand Down Expand Up @@ -412,10 +416,6 @@ int SDLVideoDriver::ProcessEvent(const SDL_Event & event)
break;
}

#ifdef VITA
ProcessAxisMotion();
#endif

return GEM_OK;
}

Expand Down Expand Up @@ -650,11 +650,11 @@ void SDLVideoDriver::HandleJoyButtonEvent(const SDL_JoyButtonEvent & button)
GamepadKeyboardEvent(SDLK_o, button.state);
break;
}
//F6 shortcut
//ESC
case BTN_START:
{
if (button.state == SDL_PRESSED)
EvntManager->OnSpecialKeyPress(GEM_FUNCTION1 + SDLK_F6-SDLK_F1);
EvntManager->OnSpecialKeyPress(GEM_ESCAPE);
break;
}
//pause combat
Expand Down

0 comments on commit eb73e1e

Please sign in to comment.