Merge branch 'master' into metal2
20
.github/mac-bundle-qt.sh
vendored
|
@ -5,16 +5,16 @@ PATH="$PATH:/usr/libexec"
|
||||||
|
|
||||||
# Construct the app iconset.
|
# Construct the app iconset.
|
||||||
mkdir alber.iconset
|
mkdir alber.iconset
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 16x16 alber.iconset/icon_16x16.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 16x16 alber.iconset/icon_16x16.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 32x32 alber.iconset/icon_16x16@2x.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 32x32 alber.iconset/icon_16x16@2x.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 32x32 alber.iconset/icon_32x32.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 32x32 alber.iconset/icon_32x32.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 64x64 alber.iconset/icon_32x32@2x.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 64x64 alber.iconset/icon_32x32@2x.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 128x128 alber.iconset/icon_128x128.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 128x128 alber.iconset/icon_128x128.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 256x256 alber.iconset/icon_128x128@2x.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 256x256 alber.iconset/icon_128x128@2x.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 256x256 alber.iconset/icon_256x256.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 256x256 alber.iconset/icon_256x256.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 512x512 alber.iconset/icon_256x256@2x.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 512x512 alber.iconset/icon_256x256@2x.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 512x512 alber.iconset/icon_512x512.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 512x512 alber.iconset/icon_512x512.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 1024x1024 alber.iconset/icon_512x512@2x.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 1024x1024 alber.iconset/icon_512x512@2x.png
|
||||||
iconutil --convert icns alber.iconset
|
iconutil --convert icns alber.iconset
|
||||||
|
|
||||||
# Set up the .app directory
|
# Set up the .app directory
|
||||||
|
|
20
.github/mac-bundle.sh
vendored
|
@ -5,16 +5,16 @@ PATH="$PATH:/usr/libexec"
|
||||||
|
|
||||||
# Construct the app iconset.
|
# Construct the app iconset.
|
||||||
mkdir alber.iconset
|
mkdir alber.iconset
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 16x16 alber.iconset/icon_16x16.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 16x16 alber.iconset/icon_16x16.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 32x32 alber.iconset/icon_16x16@2x.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 32x32 alber.iconset/icon_16x16@2x.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 32x32 alber.iconset/icon_32x32.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 32x32 alber.iconset/icon_32x32.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 64x64 alber.iconset/icon_32x32@2x.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 64x64 alber.iconset/icon_32x32@2x.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 128x128 alber.iconset/icon_128x128.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 128x128 alber.iconset/icon_128x128.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 256x256 alber.iconset/icon_128x128@2x.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 256x256 alber.iconset/icon_128x128@2x.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 256x256 alber.iconset/icon_256x256.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 256x256 alber.iconset/icon_256x256.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 512x512 alber.iconset/icon_256x256@2x.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 512x512 alber.iconset/icon_256x256@2x.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 512x512 alber.iconset/icon_512x512.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 72 -resize 512x512 alber.iconset/icon_512x512.png
|
||||||
convert docs/img/alber-icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 1024x1024 alber.iconset/icon_512x512@2x.png
|
convert docs/img/mac_icon.ico -alpha on -background none -units PixelsPerInch -density 144 -resize 1024x1024 alber.iconset/icon_512x512@2x.png
|
||||||
iconutil --convert icns alber.iconset
|
iconutil --convert icns alber.iconset
|
||||||
|
|
||||||
# Set up the .app directory
|
# Set up the .app directory
|
||||||
|
|
2
.github/workflows/Linux_AppImage_Build.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
run: git submodule update --init --recursive
|
run: git submodule update --init --recursive
|
||||||
|
|
||||||
- name: Install misc packages
|
- name: Install misc packages
|
||||||
run: sudo apt-get update && sudo apt install libx11-dev libgl1 libglx-mesa0 mesa-common-dev libfuse2
|
run: sudo apt-get update && sudo apt install libx11-dev libgl1 libglx-mesa0 mesa-common-dev libfuse2 libwayland-dev
|
||||||
|
|
||||||
- name: Install newer Clang
|
- name: Install newer Clang
|
||||||
run: |
|
run: |
|
||||||
|
|
2
.github/workflows/Linux_Build.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
run: git submodule update --init --recursive
|
run: git submodule update --init --recursive
|
||||||
|
|
||||||
- name: Install misc packages
|
- name: Install misc packages
|
||||||
run: sudo apt-get update && sudo apt install libx11-dev libgl1 libglx-mesa0 mesa-common-dev
|
run: sudo apt-get update && sudo apt install libx11-dev libgl1 libglx-mesa0 mesa-common-dev libwayland-dev
|
||||||
|
|
||||||
- name: Install newer Clang
|
- name: Install newer Clang
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -25,6 +25,12 @@ if(APPLE)
|
||||||
enable_language(OBJC)
|
enable_language(OBJC)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Enable RC support in order to use resource files for application icons
|
||||||
|
if(WIN32)
|
||||||
|
enable_language(RC)
|
||||||
|
set(APP_RESOURCES docs/img/windows_icon.rc)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
if(NOT CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-nonliteral -Wno-format-security -Wno-invalid-offsetof")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-nonliteral -Wno-format-security -Wno-invalid-offsetof")
|
||||||
endif()
|
endif()
|
||||||
|
@ -668,7 +674,7 @@ if(NOT BUILD_HYDRA_CORE AND NOT BUILD_LIBRETRO_CORE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(Alber PRIVATE AlberCore)
|
target_link_libraries(Alber PRIVATE AlberCore)
|
||||||
target_sources(Alber PRIVATE ${FRONTEND_SOURCE_FILES} ${FRONTEND_HEADER_FILES})
|
target_sources(Alber PRIVATE ${FRONTEND_SOURCE_FILES} ${FRONTEND_HEADER_FILES} ${APP_RESOURCES})
|
||||||
elseif(BUILD_HYDRA_CORE)
|
elseif(BUILD_HYDRA_CORE)
|
||||||
target_compile_definitions(AlberCore PRIVATE PANDA3DS_HYDRA_CORE=1)
|
target_compile_definitions(AlberCore PRIVATE PANDA3DS_HYDRA_CORE=1)
|
||||||
include_directories(third_party/hydra_core/include)
|
include_directories(third_party/hydra_core/include)
|
||||||
|
|
Before Width: | Height: | Size: 2 MiB After Width: | Height: | Size: 2 MiB |
BIN
docs/img/windows_icon.ico
Normal file
After Width: | Height: | Size: 54 KiB |
1
docs/img/windows_icon.rc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
AlberIcon ICON "windows_icon.ico"
|
|
@ -643,8 +643,8 @@ namespace Audio {
|
||||||
response.command = request.command;
|
response.command = request.command;
|
||||||
response.mode = request.mode;
|
response.mode = request.mode;
|
||||||
|
|
||||||
// TODO: Make this a toggle in config.toml. Currently we have it off by default until we finish the DSP mixer.
|
// TODO: Make this a toggle in config.toml. Currently we have it on by default.
|
||||||
constexpr bool enableAAC = false;
|
constexpr bool enableAAC = true;
|
||||||
if (enableAAC) {
|
if (enableAAC) {
|
||||||
aacDecoder->decode(response, request, [this](u32 paddr) { return getPointerPhys<u8>(paddr); });
|
aacDecoder->decode(response, request, [this](u32 paddr) { return getPointerPhys<u8>(paddr); });
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,8 @@
|
||||||
|
|
||||||
MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent), keyboardMappings(InputMappings::defaultKeyboardMappings()) {
|
MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent), keyboardMappings(InputMappings::defaultKeyboardMappings()) {
|
||||||
setWindowTitle("Alber");
|
setWindowTitle("Alber");
|
||||||
|
setWindowIcon(QIcon(":/docs/img/rpog_icon.png"));
|
||||||
|
|
||||||
// Enable drop events for loading ROMs
|
// Enable drop events for loading ROMs
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
resize(800, 240 * 4);
|
resize(800, 240 * 4);
|
||||||
|
|
|
@ -40,11 +40,18 @@ FrontendSDL::FrontendSDL() : keyboardMappings(InputMappings::defaultKeyboardMapp
|
||||||
printf("Welcome to Panda3DS v%s!\n", PANDA3DS_VERSION);
|
printf("Welcome to Panda3DS v%s!\n", PANDA3DS_VERSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Positions of the window
|
||||||
|
int windowX, windowY;
|
||||||
|
|
||||||
// Apply window size settings if the appropriate option is enabled
|
// Apply window size settings if the appropriate option is enabled
|
||||||
if (config.windowSettings.rememberPosition) {
|
if (config.windowSettings.rememberPosition) {
|
||||||
|
windowX = config.windowSettings.x;
|
||||||
|
windowY = config.windowSettings.y;
|
||||||
windowWidth = config.windowSettings.width;
|
windowWidth = config.windowSettings.width;
|
||||||
windowHeight = config.windowSettings.height;
|
windowHeight = config.windowSettings.height;
|
||||||
} else {
|
} else {
|
||||||
|
windowX = SDL_WINDOWPOS_CENTERED;
|
||||||
|
windowY = SDL_WINDOWPOS_CENTERED;
|
||||||
windowWidth = 400;
|
windowWidth = 400;
|
||||||
windowHeight = 480;
|
windowHeight = 480;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +63,7 @@ FrontendSDL::FrontendSDL() : keyboardMappings(InputMappings::defaultKeyboardMapp
|
||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
|
||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, config.rendererType == RendererType::Software ? 3 : 4);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, config.rendererType == RendererType::Software ? 3 : 4);
|
||||||
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, config.rendererType == RendererType::Software ? 3 : 1);
|
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, config.rendererType == RendererType::Software ? 3 : 1);
|
||||||
window = SDL_CreateWindow(windowTitle, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, windowWidth, windowHeight, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
|
window = SDL_CreateWindow(windowTitle, windowX, windowY, windowWidth, windowHeight, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
|
||||||
|
|
||||||
if (window == nullptr) {
|
if (window == nullptr) {
|
||||||
Helpers::panic("Window creation failed: %s", SDL_GetError());
|
Helpers::panic("Window creation failed: %s", SDL_GetError());
|
||||||
|
@ -76,9 +83,7 @@ FrontendSDL::FrontendSDL() : keyboardMappings(InputMappings::defaultKeyboardMapp
|
||||||
|
|
||||||
#ifdef PANDA3DS_ENABLE_VULKAN
|
#ifdef PANDA3DS_ENABLE_VULKAN
|
||||||
if (config.rendererType == RendererType::Vulkan) {
|
if (config.rendererType == RendererType::Vulkan) {
|
||||||
window = SDL_CreateWindow(
|
window = SDL_CreateWindow(windowTitle, windowX, windowY, windowWidth, windowHeight, SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE);
|
||||||
windowTitle, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, windowWidth, windowHeight, SDL_WINDOW_VULKAN | SDL_WINDOW_RESIZABLE
|
|
||||||
);
|
|
||||||
|
|
||||||
if (window == nullptr) {
|
if (window == nullptr) {
|
||||||
Helpers::warn("Window creation failed: %s", SDL_GetError());
|
Helpers::warn("Window creation failed: %s", SDL_GetError());
|
||||||
|
@ -126,8 +131,6 @@ void FrontendSDL::run() {
|
||||||
|
|
||||||
// Remember window position & size for future runs
|
// Remember window position & size for future runs
|
||||||
auto& windowSettings = emu.getConfig().windowSettings;
|
auto& windowSettings = emu.getConfig().windowSettings;
|
||||||
// Note: For the time being we currently don't actually apply the x/y positions to the window, and center it instead
|
|
||||||
// This is subject to change in the future, so let's save the x/y positions to the config file anyways
|
|
||||||
SDL_GetWindowPosition(window, &windowSettings.x, &windowSettings.y);
|
SDL_GetWindowPosition(window, &windowSettings.x, &windowSettings.y);
|
||||||
SDL_GetWindowSize(window, &windowSettings.width, &windowSettings.height);
|
SDL_GetWindowSize(window, &windowSettings.width, &windowSettings.height);
|
||||||
return;
|
return;
|
||||||
|
|
BIN
src/pandroid/app/src/main/ic_launcher-playstore.png
Normal file
After Width: | Height: | Size: 209 KiB |
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@drawable/ic_launcher_background" />
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 982 B After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 9.5 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 25 KiB |
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<color name="ic_launcher_background">#C45F5F</color>
|
||||||
|
</resources>
|