mirror of https://github.com/stella-emu/stella.git
Merge remote-tracking branch 'remotes/origin/master' into feature-highscores
This commit is contained in:
commit
38bc7eb245
|
@ -119,11 +119,21 @@ void FrameBufferSDL2::queryHardware(vector<Common::Size>& fullscreenRes,
|
|||
// Now get the maximum windowed desktop resolution
|
||||
// Try to take into account taskbars, etc, if available
|
||||
#if SDL_VERSION_ATLEAST(2,0,5)
|
||||
// Take window title-bar into account; SDL_GetDisplayUsableBounds doesn't do that
|
||||
int wTop = 0, wLeft = 0, wBottom = 0, wRight = 0;
|
||||
SDL_Window* tmpWindow = SDL_CreateWindow("", 0, 0, 0, 0, SDL_WINDOW_HIDDEN);
|
||||
if(tmpWindow != nullptr)
|
||||
{
|
||||
SDL_GetWindowBordersSize(tmpWindow, &wTop, &wLeft, &wBottom, &wRight);
|
||||
SDL_DestroyWindow(tmpWindow);
|
||||
}
|
||||
|
||||
SDL_Rect r;
|
||||
for(int i = 0; i < myNumDisplays; ++i)
|
||||
{
|
||||
// Display bounds minus dock
|
||||
SDL_GetDisplayUsableBounds(i, &r); // Requires SDL-2.0.5 or higher
|
||||
r.h -= (wTop + wBottom);
|
||||
windowedRes.emplace_back(r.w, r.h);
|
||||
}
|
||||
#else
|
||||
|
|
|
@ -849,12 +849,20 @@ PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultRight
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultLeftPaddlesMapping = {
|
||||
#if defined(RETRON77)
|
||||
{Event::PaddleZeroAnalog, JOY_CTRL_NONE, JoyAxis::Z, JoyDir::ANALOG},
|
||||
#else
|
||||
{Event::PaddleZeroAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
|
||||
#endif
|
||||
// Current code does NOT allow digital and anlog events on the same axis at the same time
|
||||
//{Event::PaddleZeroDecrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
|
||||
//{Event::PaddleZeroIncrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
|
||||
{Event::PaddleZeroFire, 0},
|
||||
#if defined(RETRON77)
|
||||
{Event::PaddleOneAnalog, JOY_CTRL_NONE, JoyAxis::A3, JoyDir::ANALOG},
|
||||
#else
|
||||
{Event::PaddleOneAnalog, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::ANALOG},
|
||||
#endif
|
||||
// Current code does NOT allow digital and anlog events on the same axis at the same
|
||||
//{Event::PaddleOneDecrease, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
|
||||
//{Event::PaddleOneIncrease, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
|
||||
|
@ -863,12 +871,20 @@ PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultLeftP
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultRightPaddlesMapping = {
|
||||
#if defined(RETRON77)
|
||||
{Event::PaddleTwoAnalog, JOY_CTRL_NONE, JoyAxis::Z, JoyDir::ANALOG},
|
||||
#else
|
||||
{Event::PaddleTwoAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
|
||||
#endif
|
||||
// Current code does NOT allow digital and anlog events on the same axis at the same
|
||||
//{Event::PaddleTwoDecrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
|
||||
//{Event::PaddleTwoIncrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
|
||||
{Event::PaddleTwoFire, 0},
|
||||
#if defined(RETRON77)
|
||||
{Event::PaddleThreeAnalog, JOY_CTRL_NONE, JoyAxis::A3, JoyDir::ANALOG},
|
||||
#else
|
||||
{Event::PaddleThreeAnalog, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::ANALOG},
|
||||
#endif
|
||||
// Current code does NOT allow digital and anlog events on the same axis at the same
|
||||
//{Event::PaddleThreeDecrease,JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
|
||||
//{Event::PaddleThreeIncrease,JOY_CTRL_NONE, JoyAxis::Y, JoyDir::NEG},
|
||||
|
|
|
@ -46,6 +46,7 @@ enum class JoyAxis {
|
|||
X = 0, // make sure these are set correctly,
|
||||
Y = 1, // since they'll be used as array indices
|
||||
Z = 2,
|
||||
A3 = 3,
|
||||
NONE = JOY_CTRL_NONE
|
||||
};
|
||||
|
||||
|
|
|
@ -38,11 +38,14 @@ Launcher::Launcher(OSystem& osystem)
|
|||
// We check those bounds now
|
||||
myWidth = std::max(myWidth, FBMinimum::Width);
|
||||
myHeight = std::max(myHeight, FBMinimum::Height);
|
||||
myWidth = std::min(myWidth, d.w);
|
||||
myHeight = std::min(myHeight, d.h);
|
||||
// do not include overscan when launcher saving size
|
||||
myOSystem.settings().setValue("launcherres", Common::Size(myWidth, myHeight));
|
||||
// now make overscan effective
|
||||
myWidth = std::min(myWidth, uInt32(d.w * overscan));
|
||||
myHeight = std::min(myHeight, uInt32(d.h * overscan));
|
||||
|
||||
myOSystem.settings().setValue("launcherres", Common::Size(myWidth, myHeight));
|
||||
|
||||
myBaseDialog = new LauncherDialog(myOSystem, *this, 0, 0, myWidth, myHeight);
|
||||
}
|
||||
|
||||
|
|
|
@ -208,6 +208,10 @@ LauncherDialog::LauncherDialog(OSystem& osystem, DialogContainer& parent,
|
|||
|
||||
// Create (empty) context menu for ROM list options
|
||||
myMenu = make_unique<ContextMenu>(this, osystem.frameBuffer().font(), EmptyVarList);
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
>>>>>>> remotes/origin/master
|
||||
|
||||
// Create global props dialog, which is used to temporarily overrride
|
||||
// ROM properties
|
||||
|
@ -475,6 +479,7 @@ void LauncherDialog::handleMouseDown(int x, int y, MouseButton b, int clickCount
|
|||
|
||||
// Add menu at current x,y mouse location
|
||||
myMenu->show(x + getAbsX(), y + getAbsY(), surface().dstRect());
|
||||
|
||||
}
|
||||
else
|
||||
Dialog::handleMouseDown(x, y, b, clickCount);
|
||||
|
|
Loading…
Reference in New Issue