VGamepad PC
The PC app for the virtual game controller.
Loading...
Searching...
No Matches
appdir.hpp File Reference
#include <QApplication>
#include <QDir>
#include <QFile>
#include <QFileInfo>
#include <QStandardPaths>
Include dependency graph for appdir.hpp:
This graph shows which files directly or indirectly include this file:

Functions

bool isPortableMode ()
 Determines if the application should run in portable mode.
QString getConfigDir ()
 Returns the directory for configuration files (settings.ini).
QString getDataDir ()
 Returns the directory for application data files (profiles, etc.).

Function Documentation

◆ getConfigDir()

QString getConfigDir ( )
inline

Returns the directory for configuration files (settings.ini).

  • Portable mode: Application directory (Windows) or parent directory (Linux)
  • Installable mode:
    • Linux: ~/.config/VirtualGamePad/
    • Windows: APPDATA%/VirtualGamePad/
  • Debug builds: Always use application directory
Warning
Instantiate the QApplication object first

◆ getDataDir()

QString getDataDir ( )
inline

Returns the directory for application data files (profiles, etc.).

  • Portable mode: Same as config directory
  • Installable mode:
    • Linux: ~/.local/share/VirtualGamePad/
    • Windows: APPDATA%/VirtualGamePad/ (same as config)
  • Debug builds: Always use application directory
Warning
Instantiate the QApplication object first

◆ isPortableMode()

bool isPortableMode ( )
inline

Determines if the application should run in portable mode.

Portable mode is determined by the build-time flag PORTABLE_BUILD.

In portable mode, settings and data are stored alongside the executable. In installable mode, standard OS locations are used (~/.config, APPDATA%, etc.).