I am developing a windows 8 compatible desktop service that uses a camera preview stream. On convertible laptops (dell xps 12), i am having trouble with the orientation of the camera. basically i need to rotate the stream in sync with the stream. I am using windows rt apis (SimpleOrientationSensor, DisplayProperties, DisplayInformation) to get this orientation information.
if i only use SimpleOrientationSensor, that does not always change in sync with the windows desktop. sometimes the desktop orientation is locked, and SimpleOrientationSensor fires events but the desktop doesn't change orientations (laptop mode).
I tried using DisplayProperties, but it only reports "landscape" while running from a service, and per http://msdn.microsoft.com/en-us/library/windows/apps/windows.graphics.display.displayproperties.aspx, DisplayProperties is deprecated: "DisplayProperties may be altered or unavailable for releases after Windows 8.1. Instead, use DisplayInformation."
if i try to use DisplayInformation.GetForCurrentView() from my desktop app, i get an exception "Windows.Graphics.Display: GetForCurrentView must be called on a thread that is associated with a CoreWindow".
I can use SimpleOrientationSensor, but I am wondering if there is an event or property for laptop mode (locked orientation) vs tablet mode (any orientation) in these convertible laptops. any help appreciated!
Update:
I found the GetSystemMetrics() API, which doesn't seem to work very well (bad error handling). Also found a registry key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\PriorityControl ConvertibleSlateMode DWORD which seems more reliable, this is what i am implementing with.
I also found this article: https://software.intel.com/en-us/articles/detecting-slateclamshell-mode-screen-orientation-in-convertible-pc
Related
When a Windows 10 computer wants to share some of its screens using webrtc protocol (firefox navigator), a list of the windows that can be shared appears. In this list, only "normal" applications appears, not the one related to "apps". By example, spotify window appears, but OneNote window is not listed.
It seems (?) webrtc screen share is not compatible with UWP apps.
Knows someone a way to share the screen of an app via webrtc ?
Note: following link allows to reproduce this issue:
https://mozilla.github.io/webrtc-landing/gum_test.html
you do not need share anything, just push "window" and see the list of windows that appears.
I believe Chromium (the open source version - not sure about Chrome) faces the same problem as UWP requires to use a new Win 10 API which shows it's own window selector. And then obviously that selector doesn't work on other problems. So it's a common problem on Win 10, with no known good solution as far as I can tell.
I am working on a Windows 8.1 store game.
There is no specific need for the game to be a windows store app but I use it for development since I already had code for windows store and didn't bother to migrate the input and game loop code to a traditional desktop app.
The issue I am having now is that the Pointer(which can be a mouse/touch/pen) is bound to the screen's resolution.
I didn't find any way to work around it or to set the mouse cursor so I can't create a first person shooter like aimer or pointer.
I know it is possible to do so in a traditional win32 desktop app but I wonder if this limitation is only for Windows Store apps or will I encounter the same limitation in a traditional desktop app that runs on Windows 8.1?
In other words is this limitation a Windows 8.1 thing? Or a Windows store app thing?
Is there a way to create a FPS like mouse/aimer in a windows 8.1 store app?
You can remove the app window bounds limitations and it is possibly even easier than in a Win32 app. The only thing you need to do is this:
Window.Current.CoreWindow.PointerCursor = null;
From now on handle this event to get the delta values when the mouse moves:
MouseDevice.GetForCurrentView().MouseMoved
I use it here.
What is the best approach to set a Windows Phone 7 led to torch mode? I have used http://www.locked.nl/wp7-flashlight-getting-started but using reflection and/or the VideoCaptureDevice is not allowed. (only works on dev phone)
I have used the AutoFocusCompleted event and have tried a task (taskfactory.new) and regular task. My latest attempt uses the DispatcherTimer.
So what is the best approach to keep calling Focus and/or FocusAtPoint to minimize the blinking and get the closest to a constant light.
Windows Phone 7 - Camera Flash App Not Functioning
In a Windows desktop application written in C# and running on Windows 8 how can I detect if Windows 8 is in desktop mode (i.e. showing the Desktop rather than the modern UI)?
Although it's in C++, the Start Screen Visibility Sample should be a good starting point for you. It uses COM objects to get the state of all monitors on the system that are either displaying Windows Store Apps or the Start Screen, and illustrates how to receive notifications when the state of a monitor changes or when the visibility of the Start screen changes.
XNA game fails to deploy on the WP7 emulator, I suppose, it's because I have Intel GMA950 video adapter without DX10 support (it says that I have incompatible monitor adapter). Is it possible to use emulator & xna without changing PC configuration?
Check your Project properties and see if you have the Reach profile selected or HiDef. If you have HiDef, change it to Reach. I have a laptop with an Intel G945 video adapter and HiDef doesnt work, but Reach does.
EDIT
I have just seen your edit and unfortunately you won't be able to do anything unless you change the the graphics device.