Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gestalt doesn't report the proper version #154

Open
FrankFromPdaSoft opened this issue Feb 4, 2022 · 2 comments
Open

Gestalt doesn't report the proper version #154

FrankFromPdaSoft opened this issue Feb 4, 2022 · 2 comments
Assignees
Labels

Comments

@FrankFromPdaSoft
Copy link
Collaborator

The subject says it all :-)

@FrankFromPdaSoft
Copy link
Collaborator Author

FrankFromPdaSoft commented Feb 6, 2022

Seems that Paul has already implemented something like this. I just found the code snippet below in my NewtTest code, which I think I got from Paul a long time ago. It seems that Paul has extended the NewtonScript Gestalt call, which normally only allows queries for system info and backlight.

However, this code snippet still shows Einstein version 2007.7 although I'm running 2022 4.17.

constant kGestaltArg_EinsteinEmulatorInfo := '[0x03000002, [struct,long], 1];
constant kDR1Version := 0x00010000;

/**
  * Determine if we're under Einstein Emulator, and if so, its version.
  *
  * @return	nil if we're on a hardware unit, the Einstein Emulator version
  *			otherwise.
  */
DefConst('kDetermineEinsteinEmulatorVersionFn,
	func() begin
		local theResult := Gestalt(kGestaltArg_EinsteinEmulatorInfo);
		if (theResult) then return theResult[0] else return nil;
	end
);

@pguyot pguyot changed the title Provide a means to get the current Einstein version from NewtonScript. Gestalt doesn't report the proper version Feb 12, 2022
@pguyot
Copy link
Owner

pguyot commented Feb 12, 2022

This is a bug.
The version is hardcoded here:

https://github.com/pguyot/Einstein/blob/master/Emulator/TNativePrimitives.cpp#L905

@pguyot pguyot added bug and removed enhancement labels Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants