isle-portable/CONFIG/qt/config.h
olebeck 47736862a7
Add PSVita port (#541)
* add psvita to cmake

* no PIE for vita

* add modules to vpk

* use custom pvr apphint

* select correct renderer for sdl renderer

* patch sdl3 shaders, got something on screen!

* use proper cmake patch for sdl

* add missing module

* remove test window which causes a bug in the vita sdl port to show up

* add gxm renderer (not working with display yet)

* avoid sdl renderer for vita, seems broken

* make gxm renderer work with new d3drm

* fix rendering somewhat, some geometry shows up

* support paletted textures directly to avoid copying the texture twice

* fix Draw2DImage

* make 3d work, broken lights

* clean up a bit

* fix normals matrix

* remove some unneeded changes

* forgot env var

* wrong env dest

* run clang format

* correct texture address mode, use tlsf instead of sceClibMspace

* double buffered uniforms seem to work now

* missed a line

* update GXMRenderer_EnumDevice

* hopefully actually fix uniform buffers

* run clang-format

* remove a change thats not needed

* improve fragment shader performance

* add vita to dist folder

* add base for vita config app

* add config self to vpk

* transform touch events to virtual size

* add livearea graphics

* Update cmake file to include livearea assets

* put manual in the right place

* add sample rco

* add messagebox on vita

* triple buffer textures because fences arent a thing on vita and making draw&cpu sync would be too slow

* make config app not crash on launch

* change defaults

* update gxm renderer with interface changes

* split 2d and 3d shaders completely

* update gxm renderer

* fix transition on gxm

* clang format

* move config cmake

* move CONFIG_vita

* always clear before drawing 2d image

* hopefully fix windows build

* clang-format fix broken includes

* order again

* undo moving qt cmake to its own list

* move uic search path

* use ifdefs for all d3drm backends, cpack to generate vpk

* cmake wrong escape

* small cleanups in gxm renderer

* defer texture delete to avoid overwriting the texture during a frame

* clang-format

* more of the layout for config

* remove top buttons

* use SceAppSettings instead of custom ui

* use select for back to info center on vita, to make screenshots possible again

* remove accidentally left in add_subdirectory

* adjust diskpath to be like other ports

* use vita_create_vpk and not cpack

* gxm: msaa support, fix wrong file path

* gxm: add mipmaps (disabled)

* clang-format

* fix open isle.ini with fopen

* add missing strings

* use iniparser_set not dictionary_set

* add default save path to config

* load config app after initializing ini on vita

* fix config build

* change the default disk & cd path, update the paf library

* update paf library headers

* include orders for clang-format

* clean up

* make shader compiler not required

* move asm language

* warn instead of error when shader source is changed when no compiler is found

---------

Co-authored-by: Li <li@silica.codes>
Co-authored-by: Christian Semmler <mail@csemmler.com>
2025-10-31 23:23:12 +00:00

106 lines
2.4 KiB
C++

#if !defined(AFX_CONFIG_H)
#define AFX_CONFIG_H
#include "AboutDlg.h"
#include "compat.h"
#include "decomp.h"
#ifdef MINIWIN
#include "miniwin/d3d.h"
#else
#include <d3d.h>
#endif
#include <string>
class LegoDeviceEnumerate;
struct Direct3DDeviceInfo;
struct MxDriver;
#define currentConfigApp (&g_theApp)
// VTABLE: CONFIG 0x00406040
// SIZE 0x108
class CConfigApp {
public:
CConfigApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CConfigApp)
public:
bool InitInstance();
int ExitInstance();
//}}AFX_VIRTUAL
// Implementation
// bool WriteReg(const char* p_key, const char* p_value) const;
// bool ReadReg(LPCSTR p_key, LPCSTR p_value, DWORD p_size) const;
// bool ReadRegBool(LPCSTR p_key, bool* p_bool) const;
// bool ReadRegInt(LPCSTR p_key, int* p_value) const;
bool IsDeviceInBasicRGBMode() const;
D3DCOLORMODEL GetHardwareDeviceColorModel() const;
bool IsPrimaryDriver() const;
bool ReadRegisterSettings();
bool ValidateSettings();
DWORD GetConditionalDeviceRenderBitDepth() const;
DWORD GetDeviceRenderBitStatus() const;
bool AdjustDisplayBitDepthBasedOnRenderStatus();
void WriteRegisterSettings() const;
void SetIniPath(const std::string& p_path);
const std::string& GetIniPath() const;
//{{AFX_MSG(CConfigApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
// DECLARE_MESSAGE_MAP()
public:
int m_aspect_ratio;
int m_x_res;
int m_y_res;
int m_exf_x_res;
int m_exf_y_res;
float m_exf_fps;
float m_frame_delta;
LegoDeviceEnumerate* m_device_enumerator;
MxDriver* m_driver;
Direct3DDeviceInfo* m_device;
int m_display_bit_depth;
int m_msaa;
int m_anisotropy;
bool m_flip_surfaces;
bool m_full_screen;
bool m_exclusive_full_screen;
int m_transition_type;
bool m_3d_video_ram;
bool m_wide_view_angle;
bool m_3d_sound;
bool m_draw_cursor;
bool m_use_joystick;
bool m_haptic;
int m_joystick_index;
int m_model_quality;
int m_texture_quality;
bool m_music;
bool m_texture_load;
bool m_custom_assets_enabled;
std::string m_texture_path;
std::string m_custom_asset_path;
std::string m_iniPath;
std::string m_base_path;
std::string m_cd_path;
std::string m_save_path;
float m_max_lod;
int m_max_actors;
int m_touch_scheme;
int m_ram_quality_limit;
};
extern CConfigApp g_theApp;
#endif // !defined(AFX_CONFIG_H)