Sign in to follow this  
Followers 0
vanka78bg

[SharpDX] [DXGI] Trying to get the current display mode

2 posts in this topic

Hello!

I am trying to get the current display mode resolution, refresh rate and pixel format with the following code:

var bounds = output.Description.DesktopBounds;
var mode = new ModeDescription
{
    Width = bounds.Right - bounds.Left,
    Height = bounds.Bottom - bounds.Top
};

output.GetClosestMatchingMode(device, mode, out ModeDescription match);

Here 'output' is the current output device. My first question is if the above code is correct? My assumption is that I can compute the current display mode resolution from the desktop bounds returned for the current output. Does that make any sense at all or is there a better way to do so? Then I call 'GetClosestMatchingMode' to get the current display mode, assuming that if I let the pixel format and refresh rate unspecified (all zeroed out), the function would fill them out with the values from the current display mode. Is my assumption correct? The above code seems to work fine on my machine, but that might just be a coincidence.

My second question is related to a particular error I am receiving. When calling 'GetDisplayModeList' and 'GetClosestMatchingMode' on my own desktop everything seems to work just fine. However, when accessing my PC via a remote desktop both methods would throw an exception with DXGI error 'DXGI_ERROR_NOT_CURRENTLY_AVAILABLE'. Is that expected or I am doing something wrong? My current workaround is to simply catch the exception and deal with it by assuming the available display modes cannot be determined, except for the current desktop resolution computed from the output bounds.

Any advice or insight regarding this would be greatly appreciated!

By the way, I have noticed that posting a code block would render it with black text on black background on my Chrome browser, making it extremely difficult to read, unless I copy-paste it to Notepad. Seems like a broken CSS perhaps? :)

Edited by vanka78bg
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Similar Content

    • By OmicronStudio
       
       
      Deus Vult - Arena is an Action Adventure and TPS with Stealth elements and a combat system based on the tactical ability and quick reflexes of the player.
      Deys Vult - Arena is the realization of a dream born playing the great masterpieces of our childhood like 'Soul Reaver', 'Metal Gear Solid', 'Doom' and a little touch of 'The Legend Of Zelda'
      The beating heart of the DVA experience is the dualism of its gameplay. The Main Characters will be 2; Lulu and Minocar, trapped in an indissoluble link! They will need each others to proceed in the adventure. With Lulu we will face the phases of Exploration, Stealth, Puzzle. And transformed in Minocar we will take on the Arenas! Making our way through hordes of enemies with viciousness, tearing and absorbing their spirits to increase our power.
      We will move our first steps impersonating Lulu, a spirit with a dark past that doesnt have any memories or consciousness of who he is or why he is there. Then we will meet Minocar, a mysterious talking skull with an axe stuck in his cranium, to whom Lulu will speak as his master.
      The story of DVA starts in Lythra, a place devastated by a supernatural catacylsm and populated by hostile creatures and deadly traps! The players goal will be to escape Lythra, to do so he will need to explore every corner of his prison, following the clues that Minocar will give him and learning to make use of his immense power!
      Lythra is an infernal dimension twisted by a supernatural cataclysm, the player will discover what really happened through clues scattered around the map, and talking with the Pure Spirits and with Minocar during the course of the adventure.
      Deus Vult-Arena is a game with a persistent world, thoroughly walkable from one end to the other without interruptions, the map in its actual state has 6 dungeons linked with various shortcuts and secret passages between one area and the other, in every dungeon there are many arenas and secret zones, only accessible through solving of ambiental puzzles or looting specific items:
       
      Minocar and Lulu togheter will be able to acquire a physical body:
      The main goal of the combat system of Deus Vult - Arena is to increase our power through absorption of the enemies spirits! To do so, the player will have first of all to destroy the physical body of the enemy, making his spirit vulnerable and allowing us to break it and absorb the fragments of his spirit to become stronger:
      But destroying and absorbing wont be so easy, because the enemy spirits, once deprived of their body will immediately look for a way to reincarnate themself:
      The same fate will await the player if he is defeated while fighting in the form of Minocar We will lose Minocar's skull that will remain on the point of our death and we will have to retrieve it
      Once back in the form of Lulu we will be defensless against most enemies, but also invisible to them, however, right when we will lose our physical form the Guardian Eyes will descend from the sky to hunt us down The Eyes will be able to see Lulu and once spotted they will make him visible to all other enemies, putting us at risk of GameOver
      We will have many ways at our disposal to deny and trick the Guardian Eyes
      The level design of DVA makes so that there will be places that Minocar will be able to reach only in the form of Lulu. So we will have to use our wit to find the best way to access areas inaccessible to physical beings.
      Many riddles will require the combined use of both Lulu and Minocar:
      Combat System When we will be in our Minocar form we will have at our disposal alot of abilities, many of which will be unlocked with the increase of our power:
      In the form of Minocar we will be able to change the elemental state instantaneously at every time, each elemental state will change the preset of all of our moves, giving life to brutal and kickass combos At the peak of his power Minocar will have 4 elemental states Primigenial, Fervor, Gelu, Fulgur:
      Minocar will be able to summon various weapons depending on his state and the used attack, from a fearsome Spiked Mace to a devastating Arquebus
      In the game there will be NPCs called the Pure Spirits, they will be hidden in various locations of the game world and will spawn when we kill certain enemies There are two ways to interact with the Pure Spirits: talk to them, or absorb them! It will be possible to talk with the Pure Spirits only in the form of LuLu and if Minocar is not present, they will give insight about the history of Lythra and what happened to its inhabitants... Talking with a Pure Spirit will make us lose affinity with Minocar, if, otherwise, we will absorb them; we will gain affinity points that can be used to unlock new abilities!
       
      Do us many questions and tell us your impressions!
    • By INTwindwolf
      DESCRIPTION
      The team is in need of an assistant Art Team Director that will assist the Project Lead and Art Director in the development of the game. The position does require you to have knowledge of the Unity Game Engine, 3D asset creation software, and a desire for project management.
      The INT team is a large, international team, focused on the development of a core demo which will showcase RPG elements and core features for fundraising and investors. We are a friendly and passionate bunch and hope you will apply soon to be part of our team. Please review the job requirements and responsibilities below.

      Starboard Games LLC is looking for a highly professional, qualified, indie team developer to join our ambitious INT project.
       
      As the INT Assistant Art Team Director you will report directly to the Project Lead and Art Lead. In the occurrence of an emergency you would become the acting Art Lead. The position does require a knowledge of the Unity game engine. This is because we would like our Assistant Art Team Director to have a knowledge of the game engine, and the ability to create scenes to showcase assets.
      Furthermore, you would need to be able to create assets for the core demo in a 3D modeling suite. Many of our artists use blender, but if you have a commercial license for another program then that would be acceptable as well. You will also need to possess team management abilities. This means you will be reviewing 3D artist work, 3D artist samples and test submissions, 2D concepts, and possess an understanding of the ‘big picture’ for INT which will be shared with you by our store, lore, and Project Directors.
      Responsibilities:
      1. Report to Art and Project Lead.
      2. Act as Acting Art Lead in the event of an emergency.
      3. Ability to think creatively.
      4. Ability to communicate effectively and work with other team leads.
      5. Desire to see the project through to completion.
      REQUIREMENTS
      1. Knowledge of the Unity Game Engine.
      2. Experience using Unity.
      3. Experience using 3D asset creation suites.
      4. Experience managing a team or being part of a team environment.
      5. Must be able to take feedback constructively.
      6. Must be able to interpret and decipher maps and notes.
      7. Must be able to work from 2D art.
      8. Commitment to the Project and the ability to spend large chunks of time working towards the completion of the project.
      BENEFITS
      We offer revenue-sharing generated from crowd-funding to team members who maintain consistent communication on company projects and meet Starboard Games deadlines. Currently we are unable to offer wages or per-item payments. Your understanding is greatly appreciated.
      Thank you for your time! We look forward to hearing from you!
      TO APPLY
      Please send your CV/Resume, as well as (the link to) your portfolio to: JohnHR@int-game.net.
      Kindest regards,
      John Shen
      HR Lead
      Starboard Games LLC
    • By INTwindwolf
      DESCRIPTION

      Starboard Games LLC is looking for a highly professional, qualified, indie team developer to join our ambitious INT project.
      INT is an upcoming Science Fiction RPG that has been in continual development for several years. The team is in need of a Level Editor and Designer to join the team to work on the development of the game. This position does not require you to be a programmer or 3D artist.
      The INT team is a large, international team, focused on the development of a core demo which will showcase RPG elements and core features for fundraising and investors. We are a friendly and passionate bunch and hope you will apply soon to be part of our team. Please review the job requirements and responsibilities below.
      As the INT Level Editor and Designer you will be the individual on the team who received art assets and builds the level to Game Dev requirements. This position will require a knowledge of the Unity Game Engine, but not programming or art asset creation knowledge.
      Our levels have been mapped out and annotated with setup notes. While these setup notes and blueprints should be followed, as our Designer you can feel free to be creative in the setup process. When you place assets and design exterior and interior spaces you can be creative in how you build these spaces out.
      Responsibilities:
      1. Report to team Leads.
      2. Report to weekly Dev Meeting.
      3. Ability to think creatively and design portions of the level when required.
      REQUIREMENTS
      1. Knowledge of the Unity Game Engine
      2. Experience using Unity and importing/setting up levels in Unity 
      3. Experience optimizing levels in Unity 
      4. Ability to work under Team Leads
      5. Must be able to take feedback constructively 
      6. Must be able to interpret and decipher maps and notes to set up the level
      BENEFITS
      We offer revenue-sharing generated from crowd-funding to team members who maintain consistent communication on company projects and meet Starboard Games deadlines. Currently we are unable to offer wages or per-item payments. Your understanding is greatly appreciated.
      Thank you for your time! We look forward to hearing from you!
      TO APPLY
      Please send your CV/Resume, as well as (the link to) your portfolio to: JohnHR@int-game.net.
      Kindest regards,
      John Shen
      HR Lead
      Starboard Games LLC
    • By esenthel
      Check out latest tech-demo of Esenthel Engine, a high performance, cross-platform game engine, in development since year 2000, it's available for licensing at http://esenthel.com/
      This is also going to be a game! See the game's facebook page here: https://www.facebook.com/EsenthelWorld/
      Try the demo by yourself: http://esenthel.com/?id=store&item=111
       
    • By khawk
      Develop:Brighton today announced the shortlisted games to be on display as part of the seventh Indie Showcase, sponsored by Unity.
      Running on 12 and 13 July within the Develop:Brighton Expo, the Indie Showcase  highlights independently-developed games selected by a judging panel of industry experts. The process takes into consideration graphics, gameplay, technology achievement and originality.
      Attendees will be able to play all the games at the Expo and on Thursday 13 July the overall Indie Showcase winner as chosen by the judging panel and the People’s Choice winner, as voted for by delegates through the Develop:Brighton website, will be announced.  
      Past shortlisted games over the last four years include critically acclaimed PC title Gunpoint; arthouse video game That Dragon, Cancer and PC title Action Henk which was picked up by Curve Studios after the event.
      "Every year we’re blown away by the standard of submissions for the Indie Showcase and this year was no exception,” commented Adam Green, chairman of the selection panel. “We had over 120 games submitted this year, which is the highest number yet. Selecting the finalists from such an incredible range of diverse titles was as challenging as it was inspiring. Be sure to swing by the Indie Showcase and check them out!"
      Managing director of Tandem Events, Andy Lane, added, “It’s been seven years since we launched the Indie Showcase, and the creativity displayed by all the indie developers that submit never ceases to amaze me.”
      “It’s fantastic to have Unity on board as sponsors for another year. Everyone involved is excited to see the industry reaction when they have hands-on opportunity at Develop:Brighton in a few weeks.”
      The shortlisted games for the Indie Showcase 2017 sponsored by Unity (in no particular order):
      Loco Dojo (Oculus Rift)
      Make Real
      Enter the whimsical wooden world of Loco Dojo! Discover a wealth of uses for Oculus Touch, taking it in turns to spin the wheel of a central board game and launch one of sixteen minigames in which to compete with your rivals for Grand Sensei's (voiced by Brian Blessed) favour.
       
      From Light (PC)
      Faffinabout
      A 2D-puzzle platformer that uses photography-inspired mechanics to challenge players to light-paint their own platforms and rescue their lost penpal.
       
      Dead End Job (PC)
      Ant Workshop
      Dead End Job merges the frantic gameplay of a procedurally generated twin-stick shooter with the look of a 90s cartoon. You take on the role of a worker at Ghoul-B-Gone – the #1 experts in paranormal pest control. Blast ghosts and then suck them up using your trusty vacuum pack, as every ghost you catch, citizen rescued, and job completed is added to the client's bill.
       
       
      Space Krieg (PC)
      We Heart Dragons
      In this tactical space dogfighting MOBA, teams of players fight it out in deep space using an innovative "real turn" system - a hybrid blend of real time and turn-based action.
       
      SVRVIVE: The Deus Helix (HTC Vive)
      SVRVIVE Studios
      A challenging mystery puzzle adventure game, inspired by classics such as Myst and Riven. With every mission comes entirely new worlds and puzzles.
       
      Abandon Ship (PC)
      Fireblade Software
      Abandon Ship is a single-player PC game where you take command of a ship and her crew, exploring a procedurally-generated world, taking on quests and dealing with random events. Frequently, you will end up engaging other ships in combat, having to employ your best tactics in order to out-manoeuvre and out-gun the enemy.
       
      ARCA (Gear VR)
      Dream Reality Interactive
      In this mobile VR physics platformer, you use hands-free VR controls to pilot the ‘ARCA Sphere' through a world of shifting platforms and abstract architecture. As you progress, the world evolves around you. Fully rebuilding a pathway through your daughter's 'mindscape' takes you a step closer to the ultimate goal - saving her life.
      Video: https://drive.google.com/a/dreamrealityinteractive.com/file/d/0B_ProX5QZRInWnVTeFU0blhaUFk/view?usp=sharing

       
      Tin Hearts (Oculus Rift)
      Rogue Sun
      In Tin Hearts players will build elaborate Rube-Goldberg machines to help a battalion of magical clockwork toy soldiers escape a series of Victorian rooms. Tin Hearts is Lemmings meets Pixar with a Dickensian aesthetic.
       
      Rocket Rumble (Android)
      Small Jelly
      Fight fast-paced space battles in a colourful sci-fi world. Collect cards featuring new ships, weapons, and defences, and build them into custom decks to conquer any foe! Choose from a huge range of  Weapons, Nanotech, and strategic Utilities. Build decks from three starter classes - sneaky Smugglers, ruthless Enforcers or mysterious Ancients.
       
      Registration is open at www.developconference.com with passes starting from as little as £160. Entry to the Expo is free.

      View full story