Commit Graph

59 Commits

Author SHA1 Message Date
lumberyard-employee-dm 0a8170f52a Added IsDirectory function to SystemFile (#4454)
* Added IsDirectory function to SystemFile

This takes the implementation in LocalFileIO and uses it for SystemFile
and then just has LocalFileIO call the SystemFile implementation

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Fixed logic to detect the WinApi FILE_ATTRIBUTE_DIRECTORY attribute

Updated the FileIO.cpp test to use AZ::IO::Path and removed direct uses
of AZStd::string

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Adding googletest printers for string and Path classes

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>

* Updated the SystemFile_WinAPI functions to use AZStd::to_wstring

This makes the the SystemFile function convert from UTF-8 to UTF-16

Signed-off-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
2021-10-04 16:36:54 -05:00
Qing Tao 5f8e60f4bb ATOM-16558 Buffer memory leak (#4444)
Fixed the memory leaking with ID3D12CommandAllocator in DX12 AsyncUploadQueue. Add reset for the ID3D12CommandAllocator when the commandlist was executed.
Fixed another small memory leak in NativeWindow.

Signed-off-by: Qing Tao <qingtao@amazon.com>
2021-10-01 15:55:37 -07:00
Chris Burel aa8594b491 Add a unit test for XcbInputDeviceKeyboard (#4393)
* Use XcbUniquePtr to manage xcb resources

Signed-off-by: Chris Burel <burelc@amazon.com>

* Add a unit test for XcbInputDeviceKeyboard

Signed-off-by: Chris Burel <burelc@amazon.com>
2021-09-30 11:19:23 -07:00
Chris Burel f5effaabcc Consolidate all xcb functionality into one subdirectory
The Linux platform has multiple windowing systems. Support for xcb is
currently in progress, support for Wayland is planned in the future. The
way the current xcb support is included is by making some file with a
`_xcb` suffix, and placing `#if PAL_TRAIT_LINUX_WINDOW_MANAGER_XCB` around
most of that file's contents.

With this change, all of the code in AzFramework that uses xcb directly is
inside the `Platform/Common/Xcb` subdirectory. It greatly reduces the
amount of code in compile-time `#ifdef` checks for the chosen windowing
system. It also provides a logical place to include O3DE-specific xcb
C++ wrappers and interfaces, without polluting non-xcb related code.

Signed-off-by: Chris Burel <burelc@amazon.com>
2021-09-27 11:44:55 -07:00
Chris Burel 08e3d14013 Move xcb files to common directory
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-09-27 11:44:55 -07:00
Chris Burel 19747cb5c6 Link to xcb as system-provided targets, instead of by direct library path (#4221)
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-09-21 12:31:42 -05:00
Chris Burel 3812e60ab6 Add support for keyboard events from xcb (#3971)
Signed-off-by: Chris Burel <burelc@amazon.com>
2021-09-20 09:09:50 -07:00
Steve Pham 2382b5cbd3 Linux fix launch project manager from editor (#4105)
Signed-off-by: Steve Pham <spham@amazon.com>
2021-09-14 12:42:16 -07:00
Steve Pham cf4cb2750a Adding missing pragma header guards to _xcb.h header files (#4029)
Signed-off-by: Steve Pham <spham@amazon.com>
2021-09-09 16:27:39 -07:00
Chris Burel 0445ec3956 Remove references to unsupported "xlib" windowing system support (#4028)
Support for X clients is provided by xcb instead.

Signed-off-by: Chris Burel <burelc@amazon.com>
2021-09-09 16:13:23 -07:00
Steve Pham 6cb2222da8 Linux native window (#3975)
Initial implementation of Native Window for Linux

Signed-off-by: Steve Pham <spham@amazon.com>
2021-09-09 10:49:39 -07:00
Artur K 567c0ae24d Modernization + AZStd::function compare fix. (#3680)
* Modernization + small fix.

Modernize ( `bool`/`override`/other) code in AzCore, AzFramework, AzQtComponents, AzToolsFramework, etc.
Replaced a `bind` or two, use `using` in a few places as well.

Fix nullptr comparison of AZStd::function.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>

* Apply review-based changes

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
2021-09-02 14:55:09 -05:00
Steve Pham fa0f2a1007 Fix unused warnings release (#3677)
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Linux
* Release build fix for Mac
* Release build fix for iOS

Signed-off-by: Steve Pham <spham@amazon.com>
2021-08-30 13:10:41 -07:00
Esteban Papp 1be95a1e76 Potential Memory Corruption in Release Build (#3559)
* Potential Memory Corruption in Release Build

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* @lumberyard-employee-dm suggested code

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* warnings as errors found in VS2022

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* simplifying some strucutres used and fixing a bug

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* some unused fixes for VS2022

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* fix for other platforms

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

* fixes check used in unit tests to be case-insensitive
fixes memory leaks/invalid memory operations in AWSCore tests

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-08-26 15:59:40 -07:00
Esteban Papp 07ea4edbc2 Fixes for Mac/iOS
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-08-23 17:51:13 -07:00
Esteban Papp cf6c7c4d8d some unused fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-08-19 18:26:43 -07:00
Nicholas Van Sickle d1cedba042 Fix NativeWindow_Windows returning the wrong size. (#3153)
Make sure WM_WINDOWPOSCHANGED bubbles up so that we can see WM_SIZE.

Signed-off-by: nvsickle <nvsickle@amazon.com>
2021-08-17 08:20:33 -05:00
moudgils 4cf384c2c5 Fix minor typo (#3095)
Signed-off-by: moudgils <moudgils@amazon.com>
2021-08-12 21:12:41 -07:00
Esteban Papp 8f05c7aa2f Several build fixes 2021-08-12 16:42:18 -07:00
moudgils c2b8542bbd Support for refresh rate and sync interval (#2989)
* Add support for querying the refresh rate and sync interval
2021-08-12 12:07:46 -07:00
abrmich f6e7760e85 Fix for checking environment variable existence
Signed-off-by: abrmich <abrmich@amazon.com>
2021-08-12 00:09:17 -07:00
SJ 0f347c11bf Add header file needed for no unity builds (#3047)
Signed-off-by: amzn-sj <srikkant@amazon.com>
2021-08-11 18:08:21 -05:00
Esteban Papp e3b22f51b2 @lumberyard-employee-dm suggestion to use (w)string_view as the src to simplify functions in conversions.h
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-08-10 11:32:49 -07:00
Esteban Papp ec1a08d487 Merge branch 'development' into cmake/SPEC-7484
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/ConfigGroup.cpp
#	Code/Editor/ControlMRU.cpp
#	Code/Editor/CryEdit.cpp
#	Code/Editor/CryEdit.h
#	Code/Editor/IEditorImpl.cpp
#	Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/GameController.cpp
2021-08-10 09:23:34 -07:00
SJ 44b053df58 [Mac] Building and running game projects from an SDK (#2943)
* 1. Initial support for loading dylibs outside the bundle.
2. Child processes inherit parent's environment if no environment is explicitly specified(should change to append the parent's environment even if environment variables are explicitly specified).
3. Update some time functions to use system uptime instead of wall clock time when computing elapsed time. This fixes false timeouts when the OS goes to sleep.
4. Increase wait times for AssetBuilders and some Atom tools to connect to the AssetProcessor. This is needed because GateKeeper slows down first time bootup which results in asset processing failures.
With this change we'll be able to run Editor and AssetProcessor from an install on Mac and we will also be able to build and run projects using the installed engine as an SDK.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* 1. Remove debug messages.
2. Fix license
3. Pass parent's environment variables to child processes by default(on Mac).

Signed-off-by: amzn-sj <srikkant@amazon.com>

* 1. Add more detailed comments.2. Use a custom ly_copy for Mac and leave the default as is.

Signed-off-by: amzn-sj <srikkant@amazon.com>

* Address some feedback from review

Signed-off-by: amzn-sj <srikkant@amazon.com>
2021-08-10 10:10:37 -05:00
michabr bb88f1f9df Fix input not working in Ctrl-G mode after UI Editor is opened (#2948)
* Fix input not working in Ctrl-G mode after UI Editor is opened

Signed-off-by: abrmich <abrmich@amazon.com>

* Delete environment variable

Signed-off-by: abrmich <abrmich@amazon.com>
2021-08-09 11:24:25 -07:00
Esteban Papp e28d04aea6 Merge branch 'development' into cmake/SPEC-7484
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/CryEditDoc.cpp
#	Code/Editor/CryEditDoc.h
#	Code/Legacy/CryCommon/CryArray.h
#	Code/Legacy/CryCommon/CryString.h
#	Code/Legacy/CryCommon/UnicodeBinding.h
#	Code/Legacy/CrySystem/LocalizedStringManager.cpp
#	Gems/LyShine/Code/Source/StringUtfUtils.h
#	Gems/PhysXDebug/Code/Source/SystemComponent.cpp
2021-08-05 20:05:25 -07:00
Artur K 4d82d9625c Fix memory leak in ProcessLauncher::LaunchProcess (#2823)
Inner scope numEnvironmentVars was shadowing the outer scope, and prevented env variable memory from being freed.

Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
2021-08-05 14:04:19 -07:00
Esteban Papp e28602dbbb linux fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-08-03 17:59:35 -07:00
Esteban Papp dd3f0b86e0 Merge branch 'development' into cmake/SPEC-7484
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>

# Conflicts:
#	Code/Editor/ToolBox.cpp
2021-08-02 18:45:25 -07:00
Steve Pham b46a80be2c Fix for Linux/Vulkan/Editor crash on startup
* Temporary fix for Linux/Vulkan/XCB where the swap chain is not ready to present until the resize is complete
* Fix invalid GUID from LinuxXcbConnectionManager

Signed-off-by: spham-amzn <spham@amazon.com>
2021-07-31 08:42:02 -07:00
Esteban Papp 63445e107a fxies for AzFramework
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-07-30 17:33:50 -07:00
Steve Pham e81f59d1e1 Create XCB Connection mechanism for WSISurface implementation for Linux (#2400)
- Add new Linux Trait to determine which display driver client API to use (only xcb supported for now)
- Add support for xcb connections (initial) for Linux/Vulkan
- Fix minor assertion caused by wrong use of sizeof
- Fix casing issue in a couple of material files (Linux is case sensitive)
2021-07-26 13:41:28 -07:00
Jeremy Ong e5983dd2af Terminate AssetProcessor when spawned by the parent project process (#2272)
* Terminate AssetProcessor when spawned by the parent project process

Signed-off-by: Jeremy Ong <jcong@amazon.com>

* Maintain default behavior (leaving AP running on quit)

To enable the autotermination feature, the ap_tether_lifetime CVAR is
provided.

Signed-off-by: Jeremy Ong <jcong@amazon.com>
2021-07-20 12:38:12 -07:00
nemerle e76b65fce9 Reduce inclusion overhead a little bit
Signed-off-by: nemerle <96597+nemerle@users.noreply.github.com>
2021-07-20 02:31:38 +02:00
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00
Esteban Papp e3be8b4c46 Enable AZ_TRAIT_AZFRAMEWORK_USE_PROJECT_MANAGER for Mac/Linux (#2017)
Validated it opens the project manager in Mac

Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
2021-07-09 09:01:35 -07:00
nvsickle 2fefa80937 Use AZ::DynamicModuleHandle
Signed-off-by: nvsickle <nvsickle@amazon.com>
2021-07-07 11:51:18 -07:00
nvsickle 21dbe8b48f Address review feedback
Signed-off-by: nvsickle <nvsickle@amazon.com>
2021-07-07 11:51:16 -07:00
nvsickle 6b76eceb1f Add GetDpiScaleFactor to native window API
-This includes implementations of the API for the Editor and Windows, all other platforms will have a 1.0 scale for now

Signed-off-by: nvsickle <nvsickle@amazon.com>
2021-07-07 11:51:08 -07:00
Steve Pham b4a2edec6a Final update copyright headers to reference license files at the repo root (#1693)
* Final update copyright headers to reference license files at the repo root

Signed-off-by: spham <spham@amazon.com>

* Fix copyright validator unit tests to support the stale O3DE header scenario

Signed-off-by: spham <spham@amazon.com>
2021-06-30 19:51:55 -07:00
Terry Michaels 7a2a2dc0d7 Updated branding for application names (#1617) 2021-06-28 11:35:13 -05:00
Steve Pham 70042fcdcd O3DE Copyright Updates for Linux Foundation (#1504) 2021-06-23 10:55:22 -07:00
moudgils 4f84ec90d3 Various new metal fixes (#1465)
* - Fix the second window related tabbing issue
- Merge calls to UseResoources acrooaa all the SRGs
- Move SamplerCache to the device to ensure only one cache to reduce duplication
- Fixes to compute threading numbers getting reset to 0,0,0
- Cleanup withing BufferPoolResolver
- Argument buffers are now queued to be cleaned up upon shutdown
2021-06-22 08:58:15 -07:00
Esteban Papp 29c71b4e53 SPEC-2513 Fixes to enable w4701 (#1105)
* Some fixes

* more fixes

* fixes for debug
2021-06-03 09:30:33 -07:00
phistere 0a8621ba0a Merge branch 'main' into ly-as-sdk/LYN-2948 2021-05-16 11:51:00 -05:00
phistere 74fda49ca4 Fixes paths to AssetProcessor when being run from SDK. 2021-05-16 11:39:49 -05:00
bosnichd 9ecbbe471b Remove lots of unused things from CrySystem (#765)
Remove lots of unused things from CrySystem
2021-05-14 15:38:59 -06:00
bosnichd 440c40e490 Remove (almost) all references to pRenderer (#651)
Remove all references to pRenderer, except from the DebugDraw and LyShine Gems that are still being updated.
2021-05-10 10:05:15 -06:00
Steve Pham 2633efbd13 Moving SystemUtilsApple.mm and SystemUtilsApple.h from CrySystem to AzFramework to fix linker error when building iOS non-monolithically (#631) 2021-05-07 07:34:35 -07:00