mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-23 22:52:34 +01:00
byuu says: The library window is gone, and replaced with hiro::BrowserWindow::openFolder(). This gives navigation capabilities to game loading, and it also completes our slotted cart selection code. As an added bonus, it's less code this way, too. I also set the window size to consistent sizes between all emulated systems, so that switching between SFC and GB don't cause the window size to keep changing, and so that the scaling size is consistent (eg at normal scale, GB @ 3x is closer to SNES @ 2x.) This means black borders in GB/GBA mode, but it doesn't look that bad, and it's not like many people ever use these modes anyway. Finally, added the placeholder tabs for video, audio and timing. I don't intend to add the timing calculator code to v095 (it might be better as a separate tool), but I'll add the ability to set video/audio rates, at least. Glitch 1: despite selecting the first item in the BrowserDialog list, if you press enter when the window appears, it doesn't activate the item until you press an arrow key first. Glitch 2: in Game Boy mode, if you set the 4x window size, it's not honoring the full requested height because the viewport is smaller than the window. 8+ years of trying to get GTK+ and Qt to simply set the god damned window size I ask for, and I still can't get them to do it reliably. Remaining issues: - finish configuration panels (video, audio, timing) - fix ruby driver compilation on Windows - add DIP switch selection window (NSS) [I may end up punting this one to v096]
57 lines
1.8 KiB
C++
57 lines
1.8 KiB
C++
#ifndef NALL_TRAITS_HPP
|
|
#define NALL_TRAITS_HPP
|
|
|
|
#include <type_traits>
|
|
#include <utility>
|
|
|
|
namespace nall {
|
|
using std::nullptr_t;
|
|
using std::forward;
|
|
using std::move;
|
|
using std::decay;
|
|
using std::declval;
|
|
|
|
using true_type = std::true_type;
|
|
using false_type = std::false_type;
|
|
|
|
template<typename T, typename U> using is_same = std::is_same<T, U>;
|
|
template<typename T, typename U> using is_base_of = std::is_base_of<T, U>;
|
|
template<typename T> using is_array = std::is_array<T>;
|
|
template<typename T> using is_function = std::is_function<T>;
|
|
template<typename T> using is_integral = std::is_integral<T>;
|
|
template<typename T> using add_const = std::add_const<T>;
|
|
template<typename T> using remove_extent = std::remove_extent<T>;
|
|
template<typename T> using remove_reference = std::remove_reference<T>;
|
|
}
|
|
|
|
namespace nall {
|
|
template<bool C> struct expression { static constexpr bool value = C; };
|
|
}
|
|
|
|
namespace nall {
|
|
namespace traits {
|
|
enum class enable_type {};
|
|
enum class disable_type {};
|
|
|
|
template<bool C, typename T = void> struct enable_if { using type = T; };
|
|
template<typename T> struct enable_if<false, T> {};
|
|
|
|
template<bool C, typename T = void> struct disable_if { using type = T; };
|
|
template<typename T> struct disable_if<true, T> {};
|
|
}
|
|
|
|
template<typename C, typename T = void> using enable_if = typename traits::enable_if<C::value, T>::type;
|
|
template<typename C, typename T = void> using disable_if = typename traits::disable_if<C::value, T>::type;
|
|
}
|
|
|
|
namespace nall {
|
|
namespace traits {
|
|
template<bool C, typename T, typename F> struct type_if { using type = T; };
|
|
template<typename T, typename F> struct type_if<false, T, F> { using type = F; };
|
|
}
|
|
|
|
template<typename C, typename T, typename F> using type_if = typename traits::type_if<C::value, T, F>::type;
|
|
}
|
|
|
|
#endif
|