cancel
Showing results for 
Search instead for 
Did you mean: 

Development on Windows 7 or Windows 8

VisualKnight
Honored Guest
Development on Windows 7 or Windows 8? What does the Oculus Team prefer?
15 REPLIES 15

cybereality
Grand Champion
@MartinSchultz : Yes, I see what you are saying. I will inquiry about this and see if we can find a solution.
AMD Ryzen 7 1800X | MSI X370 Titanium | G.Skill 16GB DDR4 3200 | EVGA SuperNOVA 1000 | Corsair Hydro H110i Gigabyte RX Vega 64 x2 | Samsung 960 Evo M.2 500GB | Seagate FireCuda SSHD 2TB | Phanteks ENTHOO EVOLV

kojack
MVP
MVP
From ovr_atomic.cpp:
Lock::Lock(unsigned spinCount)
{
// Try to load function dynamically so that we don't require NT
// On Windows NT we will use InitializeCriticalSectionAndSpinCount
static bool initTried = 0;
static Function_InitializeCriticalSectionAndSpinCount pInitFn = 0;

if (!initTried)
{
HMODULE hmodule = ::LoadLibrary(OVR_STR("kernel32.dll"));
pInitFn = (Function_InitializeCriticalSectionAndSpinCount)
::GetProcAddress(hmodule, "InitializeCriticalSectionAndSpinCount");
initTried = 1;
}

// Initialize the critical section
if (pInitFn)
pInitFn(&cs, spinCount);
else
::InitializeCriticalSection(&cs);
}

In Winrt you can't call LoadLibrary, InitializeCriticalSectionAndSpinCount or InitializeCriticalSection.
GetProcAddress still works (you need to get the library handle from LoadPackageLibrary, which won't load kernel32).

There's InitializeCriticalSectionEx (which has a spincount). But it's only available on Vista and above.
Then again, windows 8 metro apps can't run on older windows anyway, so if you build ovr for windows 8 metro then a define could replace all that code with InitializeCriticalSectionEx instead of trying to decide at runtime if the function is there.
Author: Oculus Monitor,  Auto Oculus Touch,  Forum Dark Mode, Phantom Touch Remover,  X-Plane Fixer
Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2

EisernSchild
Explorer
"kojack" wrote:
From ovr_atomic.cpp:
In Winrt you can't call LoadLibrary, InitializeCriticalSectionAndSpinCount or InitializeCriticalSection.
GetProcAddress still works (you need to get the library handle from LoadPackageLibrary, which won't load kernel32).

There's InitializeCriticalSectionEx (which has a spincount). But it's only available on Vista and above.
Then again, windows 8 metro apps can't run on older windows anyway, so if you build ovr for windows 8 metro then a define could replace all that code with InitializeCriticalSectionEx instead of trying to decide at runtime if the function is there.


Thx a ton, man. Without you i would have possibly searched hours for that 😉 Created a new Topic in the General Development section posting the code.

Thoth_The3x
Explorer
Does anyone actually use Metro? I use windows 8 but just immediately installed Start 8 to make it look the same as windows 7. Windows 8 and Windows 7 are pretty much the same.

kojack
MVP
MVP
I don't use win 8 and if I did I wouldn't use metro (I had to use it once on my aunty's laptop to install a new printer, horrible experience), but if you want to sell your stuff on the microsoft app store then you need to support it.
Author: Oculus Monitor,  Auto Oculus Touch,  Forum Dark Mode, Phantom Touch Remover,  X-Plane Fixer
Hardware: Threadripper 1950x, MSI Gaming Trio 2080TI, Asrock X399 Taich
Headsets: Wrap 1200VR, DK1, DK2, CV1, Rift-S, GearVR, Go, Quest, Quest 2, Reverb G2

Joewa
Explorer
I use 8 and prefer it to 7, start menu included, though in practice I barely ever use Metro apps.