Commit graph

87 commits

Author SHA1 Message Date
Unknown W. Brackets
82706ef82d Fix a crash if the gpu doesn't load.
E.g. for invalid files with multithreading enabled.
2013-11-06 07:49:32 -08:00
adrian17
0a086915f5 We don't need to reset the counter as it's already done in Reset() 2013-10-23 19:05:08 +02:00
Sacha
fafe4fc4f2 Fix multi-threading crashes on shutdown with Linux and Blackberry. Fixes issue #3133 -- thanks @unknown 2013-10-17 17:39:04 +10:00
The Dax
845a25e897 Whoops. Forgot to push this. 2013-10-15 03:41:11 -04:00
The Dax
b549a4e6e5 Assume g_Config.memCardDirectory will have a trailing slash. Make InitSysDirectories for Win32 only. 2013-10-15 03:41:10 -04:00
The Dax
6efd5b33f7 We don't really need DIRECTORY_FLASH0 or DIRECTORY_MEMSTICK. 2013-10-15 03:41:10 -04:00
The Dax
c7bdeb3084 Eliminate GetSysDirectories and instead provide a new function: GetSysDirectory.
On Win32, call InitSysDirectories before the emuthread starts just to be safe.
2013-10-15 03:41:10 -04:00
The Dax
22e7b64df3 Don't write files before creating the directory in the first place. 2013-10-14 17:28:27 -04:00
The Dax
45d6ab9d7b Support more than just UTF-8. 2013-10-14 02:46:05 -04:00
The Dax
702c355cb6 Use a C++ version. 2013-10-14 02:24:02 -04:00
The Dax
81e7f1204c Support unicode paths in installed.txt.
The only caveat is it has to be saved as a UTF-8 file or it won't work properly.
Also, make some variables const since they're not changed.
2013-10-14 00:12:17 -04:00
The Dax
54de8739f1 Fix critical bug with GetSysDirectories. 2013-10-13 19:30:07 -04:00
The Dax
823b6ee465 Clean up GetSysDirectories. File::GetExeDirectory is much cleaner. 2013-10-13 19:01:53 -04:00
The Dax
85f6d6bf0e If the custom directory or the current directory is read-only, fall back on the Documents directory.
After that point(if Documents is somehow read-only), we'd be screwed anyway, so there's no need to bother checking it..
2013-10-13 18:22:04 -04:00
The Dax
d8a0adf50c If installed.txt has a path in it, use that instead of the detected Documents directory. 2013-10-13 17:43:01 -04:00
The Dax
b3018eb37f Allow Win32 to store its saves, config files, etc., elsewhere.
If installed.txt exists(or the executable directory is read-only), use the user's My Documents(XP) or Documents(7/8/8.1) directory to search for everything. If it doesn't, or we can't determine the directory for some reason, use the old behaviour.
2013-10-13 16:45:59 -04:00
Unknown W. Brackets
479a9801d4 Shutdown issues: the legend continues.
If the gpu was slow (softgpu for example), it might still be accessing
memory.  Need to let it wake, and ignoring coreState too.
2013-10-13 09:35:02 -07:00
Henrik Rydgård
cdba174ab7 Merge pull request #4148 from unknownbrackets/config-files
Allow config files and fonts to be on the memstick
2013-10-13 04:01:01 -07:00
Unknown W. Brackets
b54e557d19 Actually, let's not wait at all in Core_Stop().
It just triggers the action on the other thread.
2013-10-12 23:20:27 -07:00
Unknown W. Brackets
af2ccbb9da Rename flashDirectory to flash0Directory. 2013-10-12 16:08:39 -07:00
Unknown W. Brackets
a79b168acc Make sure the cpu thread ends on Core_Stop().
Sometimes it didn't, which was just a bit confusing.
2013-10-12 10:55:31 -07:00
Unknown W. Brackets
90c49befd4 Fix a possible race on shutdown. 2013-10-12 02:08:00 -07:00
Unknown W. Brackets
093255a895 Avoid an unlikely buffer overflow. 2013-10-05 11:13:40 -07:00
Unknown W. Brackets
086294b495 Listen for shutdown in thread loops.
This way we don't need to use wait_for(), much better.
Also because there are slightly more correct cond vars on win32.
2013-09-28 00:45:54 -07:00
Unknown W. Brackets
4b9056fa02 Shutdown cleanly even when GE debugger is paused. 2013-09-28 00:32:45 -07:00
Unknown W. Brackets
418d6c1e83 Reset the game when loading a state fails.
This way it doesn't crash.
2013-09-14 21:19:10 -07:00
Unknown W. Brackets
2ac5bcff1f Process savestates during single stepping.
This way we can handle them on the same thread, without weird delays.
2013-09-14 18:43:23 -07:00
Unknown W. Brackets
38e30e5a67 Fix bugs when memory size is 0x04C00000/etc.
Was experimenting with trying to match my non-phat's ram size.
2013-09-09 00:25:10 -07:00
Unknown W. Brackets
bbf714c361 Provide for GPU init failure, kill a warning. 2013-09-07 22:30:30 -07:00
Unknown W. Brackets
08b41df6a2 Change a few more log types. 2013-09-07 13:31:14 -07:00
Henrik Rydgard
55aa3d13c7 Win32: Switch to a UNICODE build. This took quite a bit of fixing. 2013-08-26 19:00:16 +02:00
Unknown W. Brackets
1ed8edb0d3 Avoid some dangerous hex constant widths. 2013-08-22 23:23:48 -07:00
Henrik Rydgård
a526b7ca7c Merge pull request #3300 from thedax/fixWin32Folders
Win32: Fix flash0/memstick folder locations.
2013-08-21 07:16:55 -07:00
The Dax
76f7ecbcac Remove some code that was screwing with Win32's ability to find its own flash0/memstick folders. WTF was that stuff anyway? :\ 2013-08-21 10:08:49 -04:00
Henrik Rydgard
87e51a5c04 Fix some window title issues, etc. 2013-08-20 17:21:25 +02:00
The Dax
75f03b4d8a NewUI: Don't init audio if sound is disabled. And remove some stray newlines. 2013-08-14 09:05:24 -04:00
The Dax
5b2483ee73 Fix a bug where sound would never be initialised if a game is started with it off, then later enabled. 2013-08-14 08:47:10 -04:00
Unknown W. Brackets
fe8850b34d Set the IO thread's name for debugging. 2013-08-11 12:22:01 -07:00
Unknown W. Brackets
169fbeaca6 As a safety, especially for win32, cap the wait. 2013-08-10 21:27:51 -07:00
Henrik Rydgård
85e17f03cc Merge pull request #3118 from unknownbrackets/io-async
Prep work for pspFileSystem and two small fixes
2013-08-10 14:32:59 -07:00
Unknown W. Brackets
00ae811446 Shutdown the filesystem after HLE. 2013-08-10 14:01:44 -07:00
Henrik Rydgard
d32e10ff0b Error handling improvements 2013-08-10 19:56:47 +02:00
Unknown W. Brackets
7e56dcf665 Ignore changes to SeparateCPUThread after startup. 2013-08-10 03:36:22 -07:00
Henrik Rydgard
c6956c299a Don't leak cpuThread objects 2013-08-10 11:39:53 +02:00
Unknown W. Brackets
1226c3dbd9 Try to prevent a deadlock if CPU doesn't NEXTFRAME. 2013-08-09 22:57:53 -07:00
Unknown W. Brackets
e71cf2ec7e Don't queue Flush() etc. while on GPU thread.
Oops, that makes it not actually flush properly of course.

Also made a simpler guard wrapper to avoid extra braces in too many
places.  Reduced contention areas slightly.
2013-08-09 22:57:52 -07:00
Unknown W. Brackets
e76f945c7e Use the native cond vars for the CPU thread. 2013-08-09 22:57:51 -07:00
Unknown W. Brackets
b0e6967697 Rename UseCPUThread to SeparateCPUThread. 2013-08-09 22:41:33 -07:00
Unknown W. Brackets
02e301e5fe Add a simple message event system to the GE.
With this, the CPU thread feature now mostly works.
2013-08-09 22:41:31 -07:00
Unknown W. Brackets
e7c7c5b3db Add a setting to launch a separate CPU thread. 2013-08-09 22:41:30 -07:00