mirror of
https://github.com/SFML/SFML.git
synced 2025-02-23 14:56:02 +08:00
Use pre-increment
This commit is contained in:
parent
e12e8e73d4
commit
c73fad46c0
@ -514,7 +514,7 @@ namespace sf::priv
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
DRMContext::DRMContext(DRMContext* shared)
|
DRMContext::DRMContext(DRMContext* shared)
|
||||||
{
|
{
|
||||||
contextCount++;
|
++contextCount;
|
||||||
if (initDrm() < 0)
|
if (initDrm() < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -540,7 +540,7 @@ DRMContext::DRMContext(DRMContext* shared)
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
DRMContext::DRMContext(DRMContext* shared, const ContextSettings& settings, const WindowImpl& owner, unsigned int /*bitsPerPixel*/)
|
DRMContext::DRMContext(DRMContext* shared, const ContextSettings& settings, const WindowImpl& owner, unsigned int /*bitsPerPixel*/)
|
||||||
{
|
{
|
||||||
contextCount++;
|
++contextCount;
|
||||||
if (initDrm() < 0)
|
if (initDrm() < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -563,7 +563,7 @@ DRMContext::DRMContext(DRMContext* shared, const ContextSettings& settings, cons
|
|||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
DRMContext::DRMContext(DRMContext* shared, const ContextSettings& settings, Vector2u /*size*/)
|
DRMContext::DRMContext(DRMContext* shared, const ContextSettings& settings, Vector2u /*size*/)
|
||||||
{
|
{
|
||||||
contextCount++;
|
++contextCount;
|
||||||
if (initDrm() < 0)
|
if (initDrm() < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ void initFileDescriptors()
|
|||||||
|
|
||||||
initialized = true;
|
initialized = true;
|
||||||
|
|
||||||
for (int i = 0; i < 32; i++)
|
for (int i = 0; i < 32; ++i)
|
||||||
{
|
{
|
||||||
std::string name("/dev/input/event");
|
std::string name("/dev/input/event");
|
||||||
std::ostringstream stream;
|
std::ostringstream stream;
|
||||||
|
@ -40,7 +40,7 @@ std::vector<VideoMode> VideoModeImpl::getFullscreenModes()
|
|||||||
|
|
||||||
if (const auto* conn = DRMContext::getDRM().savedConnector)
|
if (const auto* conn = DRMContext::getDRM().savedConnector)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < conn->count_modes; i++)
|
for (int i = 0; i < conn->count_modes; ++i)
|
||||||
modes.push_back(VideoMode({conn->modes[i].hdisplay, conn->modes[i].vdisplay}));
|
modes.push_back(VideoMode({conn->modes[i].hdisplay, conn->modes[i].vdisplay}));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user