commit
bf9f59d3e3
15659
extlibs/headers/stb_image/stb_image.h
vendored
15659
extlibs/headers/stb_image/stb_image.h
vendored
File diff suppressed because it is too large
Load Diff
3414
extlibs/headers/stb_image/stb_image_write.h
vendored
3414
extlibs/headers/stb_image/stb_image_write.h
vendored
File diff suppressed because it is too large
Load Diff
@ -75,8 +75,8 @@ public:
|
||||
/// \brief Load the image from a file on disk
|
||||
///
|
||||
/// The supported image formats are bmp, png, tga, jpg, gif,
|
||||
/// psd, hdr and pic. Some format options are not supported,
|
||||
/// like progressive jpeg.
|
||||
/// psd, hdr, pic and pnm. Some format options are not supported,
|
||||
/// like jpeg with arithmetic coding or ASCII pnm.
|
||||
/// If this function fails, the image is left unchanged.
|
||||
///
|
||||
/// \param filename Path of the image file to load
|
||||
@ -92,8 +92,8 @@ public:
|
||||
/// \brief Load the image from a file in memory
|
||||
///
|
||||
/// The supported image formats are bmp, png, tga, jpg, gif,
|
||||
/// psd, hdr and pic. Some format options are not supported,
|
||||
/// like progressive jpeg.
|
||||
/// psd, hdr, pic and pnm. Some format options are not supported,
|
||||
/// like jpeg with arithmetic coding or ASCII pnm.
|
||||
/// If this function fails, the image is left unchanged.
|
||||
///
|
||||
/// \param data Pointer to the file data in memory
|
||||
@ -110,8 +110,8 @@ public:
|
||||
/// \brief Load the image from a custom stream
|
||||
///
|
||||
/// The supported image formats are bmp, png, tga, jpg, gif,
|
||||
/// psd, hdr and pic. Some format options are not supported,
|
||||
/// like progressive jpeg.
|
||||
/// psd, hdr, pic and pnm. Some format options are not supported,
|
||||
/// like jpeg with arithmetic coding or ASCII pnm.
|
||||
/// If this function fails, the image is left unchanged.
|
||||
///
|
||||
/// \param stream Source stream to read from
|
||||
|
@ -421,7 +421,7 @@ bool eventProcess(sf::Event& event)
|
||||
event.key.shift = shiftDown();
|
||||
event.key.system = systemDown();
|
||||
|
||||
keyMap[kb] = inputEvent.value;
|
||||
keyMap[static_cast<std::size_t>(kb)] = inputEvent.value;
|
||||
|
||||
if (special && inputEvent.value)
|
||||
doDeferredText = special;
|
||||
@ -501,7 +501,7 @@ bool eventProcess(sf::Event& event)
|
||||
//
|
||||
// We only clear the ICANON flag for the time of reading
|
||||
|
||||
newTerminalConfig.c_lflag &= ~(tcflag_t)ICANON;
|
||||
newTerminalConfig.c_lflag &= ~static_cast<tcflag_t>(ICANON);
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &newTerminalConfig);
|
||||
|
||||
timeval timeout;
|
||||
@ -572,7 +572,7 @@ bool InputImpl::isKeyPressed(Keyboard::Key key)
|
||||
return false;
|
||||
|
||||
update();
|
||||
return keyMap[key];
|
||||
return keyMap[static_cast<std::size_t>(key)];
|
||||
}
|
||||
|
||||
|
||||
@ -698,14 +698,14 @@ void InputImpl::setTerminalConfig()
|
||||
std::scoped_lock lock(inputMutex);
|
||||
initFileDescriptors();
|
||||
|
||||
tcgetattr(STDIN_FILENO, &newTerminalConfig); // get current terminal config
|
||||
oldTerminalConfig = newTerminalConfig; // create a backup
|
||||
newTerminalConfig.c_lflag &= ~(tcflag_t)ECHO; // disable console feedback
|
||||
newTerminalConfig.c_lflag &= ~(tcflag_t)ISIG; // disable signals
|
||||
newTerminalConfig.c_lflag |= ICANON; // disable noncanonical mode
|
||||
newTerminalConfig.c_iflag |= IGNCR; // ignore carriage return
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &newTerminalConfig); // set our new config
|
||||
tcflush(STDIN_FILENO, TCIFLUSH); // flush the buffer
|
||||
tcgetattr(STDIN_FILENO, &newTerminalConfig); // get current terminal config
|
||||
oldTerminalConfig = newTerminalConfig; // create a backup
|
||||
newTerminalConfig.c_lflag &= ~static_cast<tcflag_t>(ECHO); // disable console feedback
|
||||
newTerminalConfig.c_lflag &= ~static_cast<tcflag_t>(ISIG); // disable signals
|
||||
newTerminalConfig.c_lflag |= ICANON; // disable noncanonical mode
|
||||
newTerminalConfig.c_iflag |= IGNCR; // ignore carriage return
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &newTerminalConfig); // set our new config
|
||||
tcflush(STDIN_FILENO, TCIFLUSH); // flush the buffer
|
||||
}
|
||||
|
||||
|
||||
|
@ -175,7 +175,7 @@ bool CursorImpl::loadFromSystem(Cursor::Type type)
|
||||
case Cursor::Arrow: shape = XC_arrow; break;
|
||||
case Cursor::Wait: shape = XC_watch; break;
|
||||
case Cursor::Text: shape = XC_xterm; break;
|
||||
case Cursor::Hand: shape = XC_hand1; break;
|
||||
case Cursor::Hand: shape = XC_hand2; break;
|
||||
case Cursor::SizeHorizontal: shape = XC_sb_h_double_arrow; break;
|
||||
case Cursor::SizeVertical: shape = XC_sb_v_double_arrow; break;
|
||||
case Cursor::SizeLeft: shape = XC_left_side; break;
|
||||
|
Loading…
Reference in New Issue
Block a user