| 1 | |
| 2 | /** |
| 3 | * |
| 4 | * @file psvita.h |
| 5 | * |
| 6 | * Part of the OpenJazz project |
| 7 | * |
| 8 | * @par Licence: |
| 9 | * Copyright (c) 2015-2026 Carsten Teibes |
| 10 | * |
| 11 | * OpenJazz is distributed under the terms of |
| 12 | * the GNU General Public License, version 2.0 |
| 13 | * |
| 14 | */ |
| 15 | |
| 16 | |
| 17 | #ifndef _PSPVITA_H |
| 18 | #define _PSPVITA_H |
| 19 | |
| 20 | #include "platform_interface.h" |
| 21 | |
| 22 | #ifdef __vita__ |
| 23 | |
| 24 | /* Device uses SDL2 */ |
| 25 | |
| 26 | // Audio config |
| 27 | #define SOUND_SAMPLES 512 |
| 28 | |
| 29 | // Keyboard config |
| 30 | #define NO_KEYBOARD_CFG |
| 31 | |
| 32 | // Video config |
| 33 | #define DEFAULT_SCREEN_WIDTH 960 |
| 34 | #define DEFAULT_SCREEN_HEIGHT 540 |
| 35 | #define FULLSCREEN_ONLY |
| 36 | #define NO_RESIZE |
| 37 | |
| 38 | // Controller config |
| 39 | #define DEFAULT_BUTTON_UP (8) |
| 40 | #define DEFAULT_BUTTON_DOWN (6) |
| 41 | #define DEFAULT_BUTTON_LEFT (7) |
| 42 | #define DEFAULT_BUTTON_RIGHT (9) |
| 43 | #define DEFAULT_BUTTON_JUMP (2) |
| 44 | #define DEFAULT_BUTTON_SWIM (1) |
| 45 | #define DEFAULT_BUTTON_FIRE (3) |
| 46 | #define DEFAULT_BUTTON_CHANGE (0) |
| 47 | #define DEFAULT_BUTTON_ENTER (5) |
| 48 | #define DEFAULT_BUTTON_ESCAPE (4) |
| 49 | #define DEFAULT_BUTTON_STATS (10) |
| 50 | #define DEFAULT_BUTTON_PAUSE (11) |
| 51 | |
| 52 | class VitaPlatform final : public IPlatform { |
| 53 | public: |
| 54 | VitaPlatform(); |
| 55 | |
| 56 | void AddGamePaths() override; |
| 57 | |
| 58 | bool InputString(const char* hint, char*& current_string, char*& new_string) override; |
| 59 | }; |
| 60 | |
| 61 | #endif |
| 62 | |
| 63 | #endif |