mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2025-02-09 00:42:56 +00:00
![Adubbz](/assets/img/avatar_default.png)
* Implemented a system updater homebrew (titled Daybreak) * git subrepo pull ./troposphere/daybreak/nanovg subrepo: subdir: "troposphere/daybreak/nanovg" merged: "c197ba2f" upstream: origin: "https://github.com/Adubbz/nanovg-deko.git" branch: "master" commit: "c197ba2f" git-subrepo: version: "0.4.1" origin: "???" commit: "???" (+1 squashed commits) Squashed commits: [232dc943] git subrepo clone https://github.com/Adubbz/nanovg-deko.git troposphere/daybreak/nanovg subrepo: subdir: "troposphere/daybreak/nanovg" merged: "52bb784b" upstream: origin: "https://github.com/Adubbz/nanovg-deko.git" branch: "master" commit: "52bb784b" git-subrepo: version: "0.4.1" origin: "???" commit: "???" * daybreak: switch to using hiddbg for home blocking (+1 squashed commits) Squashed commits: [4bfc7b0d] daybreak: block the home button during installation
37 lines
867 B
C++
37 lines
867 B
C++
/*
|
|
** Sample Framework for deko3d Applications
|
|
** CExternalImage.h: Utility class for loading images from the filesystem
|
|
*/
|
|
#pragma once
|
|
#include "common.h"
|
|
#include "CMemPool.h"
|
|
|
|
class CExternalImage
|
|
{
|
|
dk::Image m_image;
|
|
dk::ImageDescriptor m_descriptor;
|
|
CMemPool::Handle m_mem;
|
|
public:
|
|
CExternalImage() : m_image{}, m_descriptor{}, m_mem{} { }
|
|
~CExternalImage()
|
|
{
|
|
m_mem.destroy();
|
|
}
|
|
|
|
constexpr operator bool() const
|
|
{
|
|
return m_mem;
|
|
}
|
|
|
|
constexpr dk::Image& get()
|
|
{
|
|
return m_image;
|
|
}
|
|
|
|
constexpr dk::ImageDescriptor const& getDescriptor() const
|
|
{
|
|
return m_descriptor;
|
|
}
|
|
|
|
bool load(CMemPool& imagePool, CMemPool& scratchPool, dk::Device device, dk::Queue transferQueue, const char* path, uint32_t width, uint32_t height, DkImageFormat format, uint32_t flags = 0);
|
|
};
|