mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-10 14:11:43 +00:00
43 lines
1.4 KiB
C++
43 lines
1.4 KiB
C++
/*
|
|
* Copyright (c) 2019-2020 Adubbz, Atmosphère-NX
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
* under the terms and conditions of the GNU General Public License,
|
|
* version 2, as published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
* more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
#include <stratosphere.hpp>
|
|
#include "htclow_manager.hpp"
|
|
#include "htclow_manager_impl.hpp"
|
|
|
|
namespace ams::htclow {
|
|
|
|
HtclowManager::HtclowManager(mem::StandardAllocator *allocator) : m_allocator(allocator), m_impl(static_cast<HtclowManagerImpl *>(allocator->Allocate(sizeof(HtclowManagerImpl), alignof(HtclowManagerImpl)))) {
|
|
std::construct_at(m_impl, m_allocator);
|
|
}
|
|
|
|
HtclowManager::~HtclowManager() {
|
|
std::destroy_at(m_impl);
|
|
m_allocator->Free(m_impl);
|
|
}
|
|
|
|
Result HtclowManager::OpenDriver(impl::DriverType driver_type) {
|
|
return m_impl->OpenDriver(driver_type);
|
|
}
|
|
|
|
void HtclowManager::CloseDriver() {
|
|
return m_impl->CloseDriver();
|
|
}
|
|
|
|
void HtclowManager::Disconnect() {
|
|
return m_impl->Disconnect();
|
|
}
|
|
|
|
}
|