Add minimum window size
This commit is contained in:
parent
2f1acc8139
commit
d4cd6d6fc9
@ -318,6 +318,7 @@ namespace irr
|
|||||||
virtual s32 getBottomPadding() { return 0; }
|
virtual s32 getBottomPadding() { return 0; }
|
||||||
virtual s32 getLeftPadding() { return 0; }
|
virtual s32 getLeftPadding() { return 0; }
|
||||||
virtual s32 getRightPadding() { return 0; }
|
virtual s32 getRightPadding() { return 0; }
|
||||||
|
virtual void setWindowMinimumSize(u32 width, u32 height) {}
|
||||||
//! Check if a driver type is supported by the engine.
|
//! Check if a driver type is supported by the engine.
|
||||||
/** Even if true is returned the driver may not be available
|
/** Even if true is returned the driver may not be available
|
||||||
for a configuration requested when creating the device. */
|
for a configuration requested when creating the device. */
|
||||||
|
@ -726,6 +726,12 @@ bool CIrrDeviceSDL::getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightne
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CIrrDeviceSDL::setWindowMinimumSize(u32 width, u32 height)
|
||||||
|
{
|
||||||
|
if (Window)
|
||||||
|
SDL_SetWindowMinimumSize(Window, width, height);
|
||||||
|
}
|
||||||
|
|
||||||
//! returns color format of the window.
|
//! returns color format of the window.
|
||||||
video::ECOLOR_FORMAT CIrrDeviceSDL::getColorFormat() const
|
video::ECOLOR_FORMAT CIrrDeviceSDL::getColorFormat() const
|
||||||
{
|
{
|
||||||
|
@ -95,6 +95,8 @@ namespace irr
|
|||||||
//! Get the current Gamma Value for the Display
|
//! Get the current Gamma Value for the Display
|
||||||
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast );
|
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue, f32 &brightness, f32 &contrast );
|
||||||
|
|
||||||
|
virtual void setWindowMinimumSize(u32 width, u32 height);
|
||||||
|
|
||||||
//! Get the device type
|
//! Get the device type
|
||||||
virtual E_DEVICE_TYPE getType() const
|
virtual E_DEVICE_TYPE getType() const
|
||||||
{
|
{
|
||||||
|
@ -2168,7 +2168,10 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
Log::warn("main", "Screen size is too small!");
|
Log::warn("main", "Screen size is too small!");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
irr_driver->getDevice()->setWindowMinimumSize(480, 480);
|
||||||
|
}
|
||||||
#ifdef MOBILE_STK
|
#ifdef MOBILE_STK
|
||||||
if (UserConfigParams::m_multitouch_controls == MULTITOUCH_CONTROLS_UNDEFINED)
|
if (UserConfigParams::m_multitouch_controls == MULTITOUCH_CONTROLS_UNDEFINED)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user